I searched around a bit and could not find this exact situation in the forums. One thread was close
http://forum.hibernate.org/viewtopic.php?t=928459 but there was some copying of collection elements going on which confused the issue. My question is much more straightforward.
Given this scenario:
- load parent and initialize a one-to-many collection of children in session 1
- close session 1
- delete some children from the parents collection
- open session 2
- re-attatch parent using session2.update
- flush session 2
Note that the deletes happened while the parent was detached...
What should happen if one-to-many is cascade="all"? Will it "unlink" the deleted children, but not delete them?
What should happen if the one-to-many is cascade="all-delete-orphan"? Does this actually remove the children from the database
Hibernate version:
2.1.6
Name and version of the database you are using:
SQL Server 2000