Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Delete bi-directional referenced object
Delete bi-directional referenced object [message #670462] Sat, 14 May 2011 07:53 Go to next message
elefat is currently offline elefatFriend
Messages: 8
Registered: August 2010
Junior Member
Hello,

I have an object A referecing B and vice versa (non-containement, one to many). Now, there is a reference on both objects (A.Bobjects 0..* type B) and an opposite (B.Aobject 0..1 type A). I set removeAllReferences = true to DeleteAction and when B is deleted, A reference is also removed. However I get an exception:

org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations):

The object is not resaved, but why is this thrown?

Re: Delete bi-directional referenced object [message #670464 is a reply to message #670462] Sat, 14 May 2011 08:15 Go to previous message
elefat is currently offline elefatFriend
Messages: 8
Registered: August 2010
Junior Member
Sorry, I just find out, DeleteAction removes first the object itself and then the opposite references to it. I have a write-through backend and it throws exception...
Previous Topic:(no subject)
Next Topic:(no subject)
Goto Forum:
  


Current Time: Thu Apr 25 12:20:48 GMT 2024

Powered by FUDForum. Page generated in 0.02467 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top