You do not have cascade delete set in hibernate do you?   I don’t think LC DS 
would delete items if you are just removing an item from a collection or set an 
association to null.  In general, just calling “deleteItem” on the child should 
remove it from the parent’s child property automatically.

If you are not running on the latest hotfix it might be worth trying that as 
there have been a few bugs fixed in that version.   I’ll send you a copy off 
list.

Jeff

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Zdenek 
Mikan
Sent: Friday, July 04, 2008 4:40 AM
Cc: flexcoders@yahoogroups.com
Subject: [flexcoders] LCDS and Hibernate - how to setup bidirectional 
relationship


I have got bi-directional association defined in LCDS and Hibernate -
one Parent has ArrayCollection of many Child objects, in Child I have
the pointer to its Parent. All works correctly, but when I try to delete
one of the child objects (either by parent.childs.removeItemAt() or
directly through dsChild.deleteItem()), my parent object just disappears
- it is deleted as well. I can fix this by making the relationship
one-directional (then it works), but I think there has to be some
setting either in LCDS or in Hibernate to prevent this.

Thanks in advance for some advice

Zdenek M

<<inline: image001.jpg>>

<<inline: image002.jpg>>

Reply via email to