I do a save(), but hibernate attempts to do an Update.
Therefore I get:
net.sf.hibernate.HibernateException: SQL insert, update or delete failed (row not found)
at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:25)
Here's the beginning of the HBM:
<class name="MasterHibernate" table="RMASTER" >
<id name="masterID" unsaved-value="null" type="com.lbss.framework.hibernate.domain.types.IntegerMapper">
<column name="RMSFILENUM" not-null="true"/>
<generator class="assigned"/>
</id>
And here's the simple code:
MasterHibernate pojo = new MasterHibernate();
pojo.setMasterID(new Integer(199));
pojo.setBlockPayment(LBSSBoolean.FALSE);
session.save(pojo);
I've tried unsaved-value=any but it gives the same problem. I must be missing something obvious here, but I've been through the faqs and docs and can't see what I'm doing wrong.
|