Ignore public/internal fields for NHibernate proxy

前端 未结 5 1165
鱼传尺愫
鱼传尺愫 2021-02-12 19:20

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:38

    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.

提交回复
热议问题