aspose file tools*
The moose likes Blog around the Campfire and the fly likes Simple Hibernate Cascade Save Example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Other » Blog around the Campfire
Bookmark "Simple Hibernate Cascade Save Example" Watch "Simple Hibernate Cascade Save Example" New topic
Author

Simple Hibernate Cascade Save Example

Christopher Rygaard
Ranch Hand

Joined: Feb 22, 2014
Posts: 42
    
    3
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:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple Hibernate Cascade Save Example