-->
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: How to update *only* one property without passing a bean
PostPosted: Sat May 29, 2004 3:52 am 
Newbie

Joined: Tue Jan 27, 2004 3:26 pm
Posts: 18
Hello,

Is there is a simple way to update only one property of abean, but without actually passing entire bean into Session.update? The problem I have is quite simple. I send a SMS Message into SMSC and store it into billing table. After that I have to update status (delivered or not) of this message, which depends on SMSC response. Since it's asynchronous process, the only information I have when I'm getting SMSC responseis ID of the entry in billing table. Of course, I can always read bean from database set status property and store it back, but this is very inconvinient and inefficient, especially when I have to update a lot of entries in billing tables. It would be nice to have some kind of update function using HQL, like:

Session.update( "BillingEntry b set b.status=? where b.id=?" );

But I didn't find this kind of function. Any advice would be appreciated.

regards
Artur


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 29, 2004 8:25 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Use JDBC.


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.