I'm trying to save a transient object like the following.
session.save(currentPersistenceObject);
xml-mapping :
-----------------
<class name="PersistenceObject" table="TRACTPRODUCERYEAR">
<id column="id" name="oid">
<generator class="identity"/>
</id>
<property name="fiscalYear" column="fiscalyear" type="java.lang.Short" not-null="true" length="4"/>
<property name="customerOid" column="customer_id" type="java.lang.Integer" not-null="true"/>
<property name="userName" column="last_changed_user" type="java.lang.String" not-null="true" length="50"/>
</class>
I encounter the following error:
Could not insert: Try to insert null into a non-nullable column in statement
[insert into TRACTPRODUCERYEAR (fiscalyear, customer_id, last_changed_user, id) values (2003, 19603, 'gn', null)]
The Dialect is
hibernate.dialect net.sf.hibernate.dialect.HSQLDialect.
Can some one please help me to understand what am I doing wrong here?
Thanks
Gowtham
|