DaveSmits wrote:
Has NHibernate support to map property like this:
public int Id { get; private set; }
using no-setter but is there also an naming stategy for? or must i make the fields then?
As to my knowledge, NHibernate supports this out of the box.
You have a property with a getter and a setter. The setter is private, but, nonetheless, there's a setter, so NHibernate can access this.
You don't have to specify a naming strategy. Moreover, you're not possible since you have no knowledge on how the field will be named.
You can map this field very simply:
Code:
<property name = "Id' column="IdColumn" />
But, why didn't you try it first ? :)