NHibernate, setting a property to lazy
Posted: Sun 27 Jan 2013 21:31
Using Entity Developer for NHibernate version 4.7.313 to generate mappings, when I set a property/database field to Lazy (f.ex. due to that field containing a big blob that I don't want to load when presenting lists), NHibernate add the following to my log4net log:
(date) [8] ERROR NHibernate.Tuple.Entity.EntityMetamodel - Lazy or no-proxy property (name of field) is not an auto property, which may result in uninitialized property access
How do I avoid NHibernate giving this error?
Is there something specific I need to choose in the mapping of the field in Entity Developer, in addition to just changing the "lazy" to "true", to avoid the error?
Or is it a bug in the Entity Developer export to xml files?
Note: I think the lazy part works, but I just want to be sure it works optimally.
(date) [8] ERROR NHibernate.Tuple.Entity.EntityMetamodel - Lazy or no-proxy property (name of field) is not an auto property, which may result in uninitialized property access
How do I avoid NHibernate giving this error?
Is there something specific I need to choose in the mapping of the field in Entity Developer, in addition to just changing the "lazy" to "true", to avoid the error?
Or is it a bug in the Entity Developer export to xml files?
Note: I think the lazy part works, but I just want to be sure it works optimally.