NHibernate Lazy=“Extra”

后端 未结 3 1295
伪装坚强ぢ
伪装坚强ぢ 2020-12-10 13:08

Is there a good explanation out there on what exactly lazy=\"extra\" is capable of?

All the posts I\'ve seen all just repeat the fact that it turns references to

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-10 13:24

    The lazy = extra allow to count the element of a collection without needing of fetching it, since the lazy entity is decorated with a proxy, when the client code ask for the .Count on the collection, a proper "select count" query is issued to the database. Without lazy=extra the collection is read from the database.

提交回复
热议问题