Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Murach's Java Servlets and JSP this week in the Servlets 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: 356
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)
 
 
subject: lazily loading collection
 
Similar Threads
update while doing save in hibernate
Indexed Collections
Please explain me the hibernate generated sql queries in console
Lazy loading not working as expected
SQLGrammarException: could not get next sequence value