This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes lazily loading collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "lazily loading collection" Watch "lazily loading collection" New topic
Author

lazily loading collection

Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 361
Suppose I have following class,





I load Event from session object. Now when i use getSpeaker(), hibernate would lazily load the speaker collection(assuming lazy is true by default).

I wanted to understand the following concept:

When I do event.getSpeaker(), which give me a set containing Speaker, is the Speaker object populdated with data, or the stubs are loaded initially and then when i make call to Speaker method the object is actually populdated

SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
 
I agree. Here's the link: http://kickstarter.com/rocket-mass-heater
 
subject: lazily loading collection