I have an application that loads objects via hibernate and then passes those objects to another tier as detached objects. Any changes to those objects are sent back down to the hibernate tier where I call saveOrUpdate()
on those objects.
Will hibernate delete one-to-many relationship child objects contained in a collection in the objects that are passed into saveOrUpdate()
if I simply remove the child object from the collection before calling saveOrUpdate()
?
If not, then how would this typically be accomplished in a hibernate application that uses detached objects?