thanks!
I changed my mapping to
Code:
<class name="test.ABusinessObject" table="ABusinessObject">
<id name="id" type="integer" unsaved-value="null">
<column name="id" sql-type="numeric(10,0)"/>
<generator class="identity"/>
</id>
<property name="aproperty" type="integer"/>
</class>
this allowed SchemaExport to produce
Code:
create table ABusinessObject (id numeric(10,0) IDENTITY NOT NULL, aproperty INT null, primary key (id))
So this gives me a mapping that I can also use to generate DDL for creating the table in Sybase.
But ...
It seems to me that this should be handled in the hibernate SybaseDialect.
Currently sqlCreateString method of net.sf.hibernate.mapping.Table gets the SQL for creating a column in two steps
1. ask the Dialect for the type to use for that column
2. if the column is flagged as an identity column ask the Dialect for the qualifier to apply (getIdentityColumnString() of Dialect)
from my perspective it looks like this should be changed to test if the column is flagged as an identiy column ask the Dialect for identity type && the identity column string
else
proceed as normal (i.e. existing code)
should l I raise this in the hibernate JIRA ?