wood burning stoves 2.0*
The moose likes Blog around the Campfire and the fly likes Simple Hibernate Lazy Loading 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 Lazy Loading Example" Watch "Simple Hibernate Lazy Loading Example" New topic
Author

Simple Hibernate Lazy Loading Example

Christopher Rygaard
Ranch Hand

Joined: Feb 22, 2014
Posts: 42
    
    3
Lazy Loading Example

This is the simplest way to illustrate lazy loading that I could cook up.

These persistent classes are nearly identical to those in the Container example I posted earlier. The interesting part is the annotation on Container._children.

The bit that illustrates the lazy loading is in HibernateExample.main().

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

This is the contained class:

This is the container class:

This example illustrates lazy loading:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple Hibernate Lazy Loading Example
 
Similar Threads
Simple Hibernate Container Example
I'm learning Hibernate, and posting examples that I've created to learn it.
Nested Map
One class whose instances are contained in multiple other classes.
Simple Hibernate POJO example