posted 6 years ago
Cascade Saving Example
This is the simplest way to illustrate cascade saving that I could cook up.
These persistent classes are nearly identical to those in the container example I posted earlier. The only difference is the annotation on Container._children.
The bit that illustrates the cascading saving is in HibernateExample.makeContents().
Notice: This is provided with no warranty whatsoever. Use at your own risk.
This is the contained class:
This is the container class:
This illustrates cascade saving: