san.pinku wrote:
I would like to know in which real scenario we should use lazy loading and where not.
Let's say you print a list of furnishers and that you have a huge amount of contacts for each of this furnishers, but that in the current page, you do not want to print them. If you do not use lazy when getting the list of furnishers, hibernate will load all the furnishers and contacts even if you do not need the latter.
Now, the question could be: "then why do not always use lazy loading", and the simple answer is : cause if you need them all, you will do a lot of selects instead of a unique one.