Lazy loading

Is there a scenario where preferred loading is preferred for lazy loading?

+3
source share
4 answers

You may need a fully-filled graph of objects before passing it to another level, that is, when working with the fact that NHibernate is referenced as separate instances.

Lazy loading only works in the context of ISession. With aggregates, any child objects are usually loaded by the parent, but you may have some scenarios in which it would be impractical to load the child objects, especially when they are not required to perform any processing that you are going to do.

+2
source

"" , . , , .

, "" .

+1

One of those that I can think of is when the child class is most often not available, but does not gain access each time the parent receives.

0
source

Yes, when you need to use the data immediately after receiving it.

0
source

Source: https://habr.com/ru/post/1728206/


All Articles