Lazy loading

Ads

 
 

Share on Google+Share on Google+

Biswajit Padhan
Lazy loading
1 Answer(s)      6 years and 9 months ago
Posted in : Hibernate

what is lazy loading ? when we set lazy = proxy what it does

Ads
View Answers

January 12, 2011 at 1:26 PM


Hi Friend,

In Lazy Loading, Hibernate engine loads only those objects that we are querying for and doesn't fetch associated entities.

In Hibernate, u can make lazy=true or lazy=false. Lazy initialization comes into play only when u deal with one to many or many to many relationships in database.

An attribute 'lazy' can be used to let Hibernate know if the associated entity or collection has to be lazily loaded or fetching previously.

Lazy initialization improves performance by delaying the fetch from the database until the returned object is actually queried for the data.

The lazy="proxy" means that NHibernate will lazily initialize instances of your class; When NHibernate retrieves an instance of your class from the database, it will - in this case - not return a 'real' instance of your class, but it will rather give you a proxy.

Thanks


Ads









Related Tutorials/Questions & Answers:
Lazy loading
Lazy loading  what is lazy loading ? when we set lazy = proxy what it does   Hi Friend, In Lazy Loading, Hibernate engine loads only those.... In Hibernate, u can make lazy=true or lazy=false. Lazy initialization comes into play
Hibernate Criteria Lazy Loading
hibernate criteria lazy loading To perform a Lazy Loading in Hibernate Criteria do the following Criteria criteria = session.createCriteria(Contact.class...", 1)); An example Lazy Loading is given below, Please consider the example
Advertisements
Hibernate lazy
In this section, you will learn about lazy loading in Hibernate
Spring Lazy Initialization, Spring Lazy Loading example
Spring Lazy Initialization In general all bean are initialized at startup. To stop such unnecessary initialization we use lazy initialization which create the bean instance when it if first requested The lazy-init attribute
Hibernare Lazy - Hibernate
Hibernare Lazy  What is a lazy loading in hibernate?i want one example of source code?plz reply
Hibernate Lazy Initialization
Hibernate Lazy Initialization  What is lazy initialization in hibernate?   In Lazy Loading, Hibernate engine loads only those objects... make lazy=true or lazy=false. Lazy initialization comes into play only when u
loading image
loading image  i use two jsp page and one servlet .And i try... animated loading image on 1st JSP while the request is being processed. If I use form submit , the animated loading does not show animated.I would like to know
Lazy initialization in hibernate.
Lazy initialization in hibernate.  What is lazy initialization in hibernate
What is lazy fetching in hibernate
What is lazy fetching in hibernate  Hi, What is lazy fetching in hibernate Thanks
Version of com.thejohnfreeman>lazy dependency
List of Version of com.thejohnfreeman>lazy dependency
Loading Models - Java3D
Loading Models  How to load 3ds / cob files. (with example plz)..... Thanks
loading image - Swing AWT
loading image  give me a source code to add any wallpaer of my PC as a background image to jpanel on a jframe
uitableviewcell loading time interval
uitableviewcell loading time interval  How can i check the time interval between loading the two cells in UITableViewCell? Please suggest. Thanks.   You can write the the NSLog to detect the uitableviewcell loading
Version of com.madgag>lazy-drawables dependency
List of Version of com.madgag>lazy-drawables dependency
Version of com.madgag>lazy-drawables dependency
List of Version of com.madgag>lazy-drawables dependency
Version of com.shamanland>lazy-files dependency
List of Version of com.shamanland>lazy-files dependency
loading Java Applet - Applet
loading Java Applet  Hi, I use the archive tag to download my applet into the Browser It takes too long to load. Can I do it in several steps... control the loading within the applet? thanks
Loading JApplet into Servlet - Applet
Loading JApplet into Servlet  Hi, I am in need of loading javax.swing.JApplet in a Serlvet. This should work for all the browsers. Firefox 2.0, Mozilla 1.7... Could you let me know the procedure to load applet into servlet
Page Loading Time
Page Loading Time  I have a application which has a tab type structure in the JSP front end and Java backend. On clicking a tab, it opens the list...-Loading-Time.shtml But I am not getting how to do it in JSP
loading page in div
loading page in div  how to load another web page in div?   <div name="iframe" id="iframe"></div> <iframe id="foo" name="foo" src="http://www.w3schools.com/"></iframe> //and in Javascript
Class.forName will do while loading drivers
Class.forName will do while loading drivers  What Class.forName will do while loading drivers
Maven Dependency lazy >> 0.2.0
You should include the dependency code given in this page to add Maven Dependency of com.thejohnfreeman >> lazy version0.2.0 in your project
Maven Dependency lazy >> 0.3.0
You should include the dependency code given in this page to add Maven Dependency of com.thejohnfreeman >> lazy version0.3.0 in your project
Maven Dependency lazy >> 0.5.0
You should include the dependency code given in this page to add Maven Dependency of com.thejohnfreeman >> lazy version0.5.0 in your project
Maven Dependency lazy >> 0.1.0
You should include the dependency code given in this page to add Maven Dependency of com.thejohnfreeman >> lazy version0.1.0 in your project
Maven Dependency lazy >> 0.4.0
You should include the dependency code given in this page to add Maven Dependency of com.thejohnfreeman >> lazy version0.4.0 in your project
Maven Dependency lazy >> 0.6.0
You should include the dependency code given in this page to add Maven Dependency of com.thejohnfreeman >> lazy version0.6.0 in your project
Version of com.madgag>lazy-drawables-samples dependency
List of Version of com.madgag>lazy-drawables-samples dependency
Version of com.madgag>lazy-drawables-tests dependency
List of Version of com.madgag>lazy-drawables-tests dependency
Version of com.madgag>lazy-drawables-samples dependency
List of Version of com.madgag>lazy-drawables-samples dependency
Version of com.madgag>lazy-drawables-tests dependency
List of Version of com.madgag>lazy-drawables-tests dependency