I am aware of this answer that explains what setting lazy=”extra” does.
My question is, is there any costs associated with using lazy=”extra”? Why wouldn’t we just set lazy=”extra” to every instance where we would otherwise set it to “true”? It seems it is same as “true” but better?
The only thing I can think of is that if a collection is mostly used as data source or for iterating on a loop it would be better to get the full collection first time you access ANY property (even
Count).Otherwise you might end up executing more queries than necessary.
For example