-->
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.  [ 2 posts ] 
Author Message
 Post subject: Run update query
PostPosted: Tue Aug 17, 2004 10:51 pm 
Newbie

Joined: Tue Feb 10, 2004 11:15 pm
Posts: 7
Hibernate version: 2.0 final

Dear All,


I am trying to run query like :

"UPDATE Table1 SET Table1.Column = Table1.Column - 10000 Where Table1.Column > 100000;"

Using Hibernate. But I need the query to "follow" the behaviour of Hibernate Transaction (Transaction tx = Session.beginTransaction()) and Hibernate Transaction Commit (tx.commit()). So that the query would never change the database until the Transaction Commit Occured and the Transaction Rollback (tx.rollback()) will reverse the state of the database before the Transaction Commit Happen.

I also need to find out whether my query is changing the database (the Table1.Column > 100000) or not (the Table1.Column < 100000).

Thank you,


Rahmat Bagas Santoso


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 18, 2004 12:35 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
session.connection().prepareStatement()


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.