-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: dynamic update property is not working
PostPosted: Thu Aug 03, 2006 2:48 am 
Newbie

Joined: Thu Aug 03, 2006 2:21 am
Posts: 2
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.
------------------------------------------------------------------------------


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.