Google News
logo
Java Hibernates - Interview Questions
Explain about Hibernate Proxy and how it helps in Lazy loading?
* Hibernate uses a proxy object in order to support Lazy loading.
* When you try loading data from tables, Hibernate doesn’t load all the mapped objects.
* After you reference a child object through getter methods, if the linked entity is not present in the session cache, then the proxy code will be entered to the database and load the linked object.
* It uses Java assist to effectively and dynamically generate sub-classed implementations of your entity objects.
Advertisement