Previously, it was always possible to map auto properties to private setters with NHibernate, but since version 3.2 this is no longer the case (not without replacing the checking object), see the NH dev discussion .
I understand the requirement protected, but why internal? This breaks the encapsulation and just feels dirty.
Is the only alternative returning to fallback fields?
UPDATE : Embarassing, but right, it turns out, is internalnot required. Thus, he gets in between throwing back to the backup fields or using a secure setter and either avoids setting values in the constructor or faces the risk of hard to track errors . Thanks to Fabio and @Nexus for pointing out my mistake.
source
share