java - What is lazy loading in Hibernate? -


What is sluggish loading in Java? I can not understand the process. Can someone help me understand the lazy loading process?

Say that you have parents and parents and children's children should be in hibernation now children "Lazy-load", which means that this does not actually load all the babies while loading parents, instead, when they are requested to do so, it loads them. Either it can express or request, and this is more common, when you have a child When you try to reach the area, then hibernation will be automatically loaded.

Lazy-loading can help improve performance significantly because you often need children and therefore they will not be loaded.

Also beware of n + 1- problem when you use the collection, hibernation will not actually load all the children. Instead, it will load each child individually. When the collection starts again, it causes a query for each child, to avoid this, you can run hibernate for all children to load together, e.g. By calling parents child (). Shape ().


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -