-->
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: Is it possible to use "where-in clause"
PostPosted: Thu Feb 23, 2006 3:32 pm 
Newbie

Joined: Thu Feb 23, 2006 3:25 pm
Posts: 1
Is it possible to update the table using "where-in clause" .For example

"UPDATE TABLENAME SET COLUMN1 = SOME_VALUE WHERE
COLUMN2 IN (1,4,5,7)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 24, 2006 12:54 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Hibernate doesn't do anything like that. It's an ORM implementation: it saves objects to the DB. It doesn't update specific columns of specific rows. You can query using Restrictions.in() or similar, modify the in-memory objects, and save them, but if you have an efficient query then use it. Call session.connection() and use JDBC/SQL to do it.


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.