It used to be possible to map auto properties with private setters with NHibernate, but starting with version 3.2 this is no longer the case (not without replacing the entity validator), see NH dev discussion.
I understand the protected
requirement, but why internal
? This breaks encapsulation, and just feels dirty.
Is the only alternative going back to backing fields?
UPDATE: Embarassing but true, it turns out internal
is not required. So, it's a toss-up between falling back to backing fields or using the protected setter and either avoiding setting values in the constructor or facing the risk of hard to track bugs. Thank you Fabio and @Nexus for pointing out my mistake.