-->
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.  [ 3 posts ] 
Author Message
 Post subject: dynamic-updates don't work???
PostPosted: Fri Mar 02, 2007 5:19 am 
Newbie

Joined: Fri Mar 02, 2007 5:01 am
Posts: 6
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.2.2.

Spring version: 2.

Name and version of the database you are using:SQL Server 2005

Hi all,

I'm developing an applicatin with Spring and Hibernate. For test purposes, I'm working with only one table, the typical Users table. All works fine but when I update a field in the front-end, the query sent to the database include all fields in the update sentence. In my map, Users.hbm.xml dynamic-update is set to true. I don't understand why. I've tested with all possible values for optimistic-lock, but the problem persists. At this moment I'm lost, I don't know what to do.

Can anybody help me?

Kind regards.


Top
 Profile  
 
 Post subject: Same problem here
PostPosted: Mon Mar 05, 2007 6:36 am 
Newbie

Joined: Mon Mar 05, 2007 6:25 am
Posts: 1
Hello all,

Im currently using Hibernate 3.2.2 and Im experiencing the same "error".

When I didnt use the dynamic-update parameter, the generated update included all fields of the mapping ( thats ok ).

Now that Im using dynamic-update="true", the same UPDATE SQL code is generated, containing every single column of the mapping? ( At least, thats what my SQL server 2005 say )

Is there anyone else running into this issue? How can I set hibernate to just generate the correct SQL update? Do I have to configure any other parameter than the "dynamic-update" to achieve this?

Thank you all in advance,

Albert


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 27, 2007 5:15 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
dynamic updates work in a session scope. therefore, it is no use if your entity is loaded by a session and updated by another one. In this case you need to also enable select before update which is a performance killer. You may only use it if you really need to do so.


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

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.