-->
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: hibernate updates data by itself. WTF?
PostPosted: Thu Oct 19, 2006 2:03 pm 
Beginner
Beginner

Joined: Fri Sep 01, 2006 3:35 pm
Posts: 21
ok, this one is even stranger:
i just tried to load data from the problematic table using createCriteria(MyBean.class).

hibernate UPDATED! my table a few hundered times (probably once per row) during the list() call:

hstar.data.ArtikelEingangBean */ update
Artikeleingang
set
lieferung=?,
artikel=?,
bestellteMenge=?,
menge=?,
mwstProzent=?,
preisBrutto=?,
preisNetto=?
where
uid=?

what's going on here?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 19, 2006 2:39 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
if you are changing the data at any point whatsoever in the POJOs before the transaction is closed, hibernate notices this and automatically persists those changes to the database.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 20, 2006 4:48 am 
Beginner
Beginner

Joined: Fri Sep 01, 2006 3:35 pm
Posts: 21
i'm changing (converting) some values in my setter code, so that's the cause of the change.


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.