Hi there, I am creating a new instance using hibernate 2.1. with SQL server 2000. I am using the
Code:
native
generator to maintain cross-platform. Here is the relevant xml part...
Code:
<class name="com.snap.businessobjects.network.Network" table="SSN_NETWORKS">
<id name="id" type="long" column="NET_ID" unsaved-value="0">
<generator class="native"/>
</id>
ASAIU from the documentation there is nothing else I should provide. I am getting the following error:
Code:
01:18:29,763 ERROR [JDBCExceptionReporter] could not insert: [com.snap.businesso
bjects.network.Network]
java.sql.SQLException: Cannot insert the value NULL into column 'NET_ID', table
'snap.dbo.SSN_NETWORKS'; column does not allow nulls. INSERT fails.
According to the documentation, since I am using SQL Server 2000 Hibernate should be using the
Code:
identity
generator which does not require any tables or parameters.
Any ideas?