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.
NHibernate, setting a property to lazy
Re: NHibernate, setting a property to lazy
Please treat this message as a warning.kindbergs.dk wrote:(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
NHibernate requires lazy or no-proxy property to be an auto property. The current implementation of our standard templates doesn't allow to use auto-properties because of supporting INotifyChanging, INotifyChanged and other property features. We will investigate the possibility of generating auto-properties by our templates and post here about the results.
-
- Posts: 15
- Joined: Sun 27 Jan 2013 21:14
Re: NHibernate, setting a property to lazy
Okay, thanks.
It was also my impression that it worked, so from now on I will ignore the 'warning' in my logs
By the way, thanks for making a really powerful tool - I would not use NHibernate without it!
It was also my impression that it worked, so from now on I will ignore the 'warning' in my logs
By the way, thanks for making a really powerful tool - I would not use NHibernate without it!
Re: NHibernate, setting a property to lazy
The behaviour is changed: .NET auto-properties are generated in code if both Property ChangeNotifiers and Property Change Partial Methods properties of a template are set to False. We will post here when the corresponding build of Entity Developer is available for download.
Re: NHibernate, setting a property to lazy
New build of Entity Developer 5.0.43 is available!
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=25825.
It can be downloaded from http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=32&t=25825.