Ignore public/internal fields for NHibernate proxy

前端 未结 5 2159
灰色年华
灰色年华 2021-02-12 19:07

I have some entity types that I would like to lazy load. However, they have some internal (assembly) fields they expose, but are not used outside that class. These fields are co

5条回答
  •  无人及你
    2021-02-12 19:37

    Can you use an Interface to declare the fields "used" ?http://nhibernate.info/doc/nh/en/index.html#persistent-classes-poco-sealed

    "Another possibility is for the class to implement an interface that declares all public members"

    I don't know if NH use the same @transient annotation/attribute as the JAVA version to ignore a property in persistent operations.

提交回复
热议问题