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
|