Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Simple Hibernate Lazy Loading Example

 
Christopher Rygaard
Ranch Hand
Posts: 42
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
 
Get out of my mind! Look! A tiny ad!
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!