Hi - We're using Hibernate 2 with Spring for a J2EE app using Weblogic server 8.
I'm trying to update a column on a table with the same value so that a trigger in the database will fire - this works fine when updating the value via the database.
I am calling getHibernateTemplate().update(myObject) from a DAO but the code doesn't seem to fire an update, it appears to do a select and seeing nothing has changed not do the update. It looks like the select-before-update, but this value is not set in the mapping, and should default to false?
<hibernate-mapping>
<class name="common.myObject.MyObject"
table="MY_TABLE"
dynamic-update="false"
dynamic-insert="false">
<id name="id"
column="MY_TABLE_ID"
type="java.lang.Long"
access="field">
<generator class="sequence">
<param name="sequence">MY_TABLE_ID_SEQ</param>
</generator>
</id>
<version name="modificationId"
access="field"
type="long"
column="MODIFICATION_ID"
unsaved-value="null" />
<property name="name"
access="field"
type="java.lang.String"
column="MY_TABLE_NAME" />
Am I missing something in the config to force the update to fire?
|