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 Container Example Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Other » Blog around the Campfire
Bookmark "Simple Hibernate Container Example" Watch "Simple Hibernate Container Example" New topic

Simple Hibernate Container Example

Christopher Rygaard
Ranch Hand

Joined: Feb 22, 2014
Posts: 42
Simple Container Example

This is the simplest stand-alone Hibernate container example I could cook up.

The interesting parts are the annotation on Contained._container and Container._children.

Notice: This is provided with no warranty whatsoever. Use at your own risk.

This is the contained class:

This is the container class:

This is an example of how to use a container in Hibernate:
Don't get me started about those stupid light bulbs.
subject: Simple Hibernate Container Example
Similar Threads
Simple Hibernate Example with Final Classes and Final Methods
Simple Hibernate Cascade Save Example
Simple Hibernate Lazy Loading Example
Simple Hibernate Example with Inner Classes
Simple Hibernate Eager Loading Example