Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

(JPA) Correct way to remove entity ?

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

In a project a bug appeared after some "unrelated" changes and we had to add a line of code to fix it.

Old code:


New code:


Mappings:


The change that I suspect triggered the problem is that change from FetchType.LAZY to FetchType.EAGER in Bar.java.
We got this exception after removeFoo() returns:



This is run under JBoss 4.2.3.GA on Windows XP Pro SP3 with Sun Java 1.6.0u20


So the question is:
Is this the correct way to remove entities? That is manually removing references to it from other entities?
Sound like a lot of "unneeded" work.

Regards,
David
 
Quick! Before anybody notices! Cover it up with this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic