Auto Increment in hibernate
843859Jun 20 2007 — edited Jun 21 2007Hello every one,
i have to write the code that used for diffrent databases like oracle,sql-server2000..
the problem has generated at the auto increment field...
the problem is as follows....
1) Identity field in sql-server but not in oracle because for oracle it uses index
i try like
<id name="id" column="id">
<generator class="increment"/>
</id>
it works fine for oracle but not for sql-server and ....
<id name="id" column="id">
<generator class="identity"/>
</id>
it works fine for sql-server but not for oracle because the id field is not null and it gives error that null field is not allowed ....
is there any other solution....then please help me
thanks
pandev84