File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Other » Blog around the Campfire
Bookmark "Simple Hibernate Cascade Save Example" Watch "Simple Hibernate Cascade Save Example" New topic

Simple Hibernate Cascade Save Example

Christopher Rygaard
Ranch Hand

Joined: Feb 22, 2014
Posts: 42
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:
subject: Simple Hibernate Cascade Save Example
jQuery in Action, 3rd edition