Two Laptop Bag*
The moose likes Object Relational Mapping and the fly likes Load vs Get Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Load vs Get" Watch "Load vs Get" New topic

Load vs Get

Rahul Ba
Ranch Hand

Joined: Oct 01, 2008
Posts: 205
I did not get the difference between load and get method on following point.

Second,load() just returns a proxy by default; the database isn’t hit until the proxy is first invoked. get() hits the database immediately. The load method is useful when you only need a proxy and don’t need to make a database call. You just need a proxy, when in a given session you need to associate an entity before
It is sorta covered in the JavaRanch Style Guide.
subject: Load vs Get
Similar Threads
Hibernate return a empty object
load() vs get()
POJOs and Legacy Databases
understanding load
How to NOT fetch a collection?