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

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
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.