Fluent-Nhibernate References and PropertyRef Doing a Select With Lazy Load

后端 未结 2 1456
逝去的感伤
逝去的感伤 2021-01-06 13:12

I am using PropertyRef for one of my References properties. With LazyLoad() it still does a Select and loads the User ent

2条回答
  •  不思量自难忘°
    2021-01-06 13:47

    Has to do with property-ref see NHibernate creates proxy via session.Load(), but not via Linq or Criteria API

    And not that you asked, but also consider that many-to-one with proxy does not allow you to do type-checking if you subclass User, see http://ayende.com/Blog/archive/2010/01/28/nhibernate-new-feature-no-proxy-associations.aspx

提交回复
热议问题