NHibernate SchemaExport with generated properties

I am wondering if there is a way to make the SchemaExport generate and identify the column for the generated property.

<id name="Id" column="Id" type="Guid">
  <generator class="guid.comb" />
</id>
<property name="OrderNumber" column="OrderNumber" type="Int32" generated="insert"/>

      

With the above mapping, ShcemaExport does not make the OrderNumber column an ​​Identity column.

Greg

0


source to share


1 answer


I figured it out with the help of Fabio Moulo:



<property name="OrderNumber" generated="insert" update="false">
  <column name ="OrderNumber" sql-type="int identity" not-null="true"/>
</property> 

      

+1


source







All Articles