Reputation: 24254
I'm using Fluent NHibernate for my mappings and the SchemaExport class to the database schema.
Is it possible with NHibernate to set a default value for a property/column in the generated database schema?
Upvotes: 1
Views: 1508
Reputation: 32924
It is definitely supported, both in XML mapping and in Fluent NHibernate.
<column>
child element of <property>
, documented here.Upvotes: 1
Reputation: 3124
Not to my knowledge, no - not in the generated schema.
You can just set the property in your constructor though.
Upvotes: 1