Changes between Initial Version and Version 1 of Cascading


Ignore:
Timestamp:
Dec 19, 2008, 7:21:54 AM (15 years ago)
Author:
erikvaningen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Cascading

    v1 v1  
     1What Hibernate cascading mode is used as much as possible? This mode is specified per cardinality in the hibernate mapping.
     2
     3'''Option 1:''' save-update
     4 * + no resources gets magically deleted
     5 * - resources do remain
     6
     7
     8'''Option 2:''' all
     9 * + related resources are always cleaned uyp
     10 * - magic deletion which might not be desirable
     11
     12Chosen option 2
     13I 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.