Reputation: 186
I'm wondering if there is a way to get SchemaExport to generate and identity column for a 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 mapping above, ShcemaExport does not make the OrderNumber column an Identity column.
Greg
Upvotes: 0
Views: 851
Reputation: 186
I figured it out, with Fabio Maulo's help:
<property name="OrderNumber" generated="insert" update="false">
<column name ="OrderNumber" sql-type="int identity" not-null="true"/>
</property>
Upvotes: 1