SetFetchMode call ignored

后端 未结 2 554
既然无缘
既然无缘 2020-12-21 09:35

I have a problem with SetFetchMode call in Criteria API in following query:

DetachedCriteria.For()
                .Add(u => u.Sta         


        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-21 10:18

    Since you are using .CreateAlias("Companies", "comp"), NHibernate can't eager-load the collection, as you could be using restrictions on that alias.

    My overall suggestion is to never use eager load on collections. Use batch_size or this trick instead.

提交回复
热议问题