I am using Dynamic-update property in the mapping file of hibernate so that only the required columns are updated, but when i look at the log, all the columns are being updated, where as only the modifed should have been updated as per meant by the use of Dynamic-update property. Can any one tell me why the Dynamic -update property is not working. Any help would be appreciated.
This is the Mapping file.
-------------------------------------------- Mapping File --------------------------------------------
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class
name="dao.Person"
dynamic-insert="true"
dynamic-update="true"
table="HIBERNATE_TEST">
<id name="id" column="ID" type="long">
<generator class="increment">
</generator>
</id>
<property column="NAME" name="name" type="string"/>
<property column="AGE" name="age" type="string"/>
<property column="SCHOOL" name="School" type="string"/>
<property column="COLLEGE" name="College" type="string"/>
</class>
</hibernate-mapping>
-------------------------------- SQL Log OUT PUT -----------------------
Hibernate: update HIBERNATE_TEST set NAME=?, AGE=?, SCHOOL=?, COLLEGE=? where ID=?
where as in my code i am updating the Name Field only.
------------------------------------------------------------------------------
|