I'm trying to set the initial seed value, but nothing I search on gives
the result I want.
I want to set the value on the identity column in my class.
I've tried this mapping:
<id name="Id" unsaved-value="0">
<column name="Id" sql-type="int identity(1,1000000)" />
<generator class="native" />
</id>
and class="identity" and no <generator/> tag at all. Nothing gives the
result I want.
Setting the class to identity or native gives exception about duplicate
"identity" and no generator tag gives exception that you can't set the
identity value on insert.
This is with a generated database with the SchemaExport class.
I can fix the database manually, but I'd like the feature where
NHibernate generates the database-schema for me.
// Kim Johansson, A happy NHibernate user