Auto Increment in hibernate

Hello 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

[812 byte] By [pandev84a] at [2007-11-27 8:16:49]
# 1
Create separate .hbm.xml mapping files for SQL Server and Oracle.
dvohra09a at 2007-7-12 20:01:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
hello frnd,thanx for reply..but how can i map these files in config file...pls help..thanx and regards,Pandev84
pandev84a at 2007-7-12 20:01:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

> hello frnd,

> thanx for reply..

>

> but how can i map these files in config file...

>

> pls help..

>

> thanx and regards,

> Pandev84

If you can't be bothered to spell out these words, and historically you also can't be bothered to answer questions or read documentation (hint: the answer to your question can be found here http://hibernate.org) why should people help you?

dcmintera at 2007-7-12 20:01:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...