Version 1 (modified by 16 years ago) ( diff ) | ,
---|
What Hibernate cascading mode is used as much as possible? This mode is specified per cardinality in the hibernate mapping.
Option 1: save-update
- + no resources gets magically deleted
- - resources do remain
Option 2: all
- + related resources are always cleaned uyp
- - magic deletion which might not be desirable
Chosen option 2 I ran into the situation that I was inserting and deleting. The thing is that with option 1, Hibernate does not delete the related resources. Therefore I have chosen for option 2. Not thought that this can be differentiated per entity.
Note:
See TracWiki
for help on using the wiki.