-->
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.  [ 1 post ] 
Author Message
 Post subject: Rolling totals
PostPosted: Tue Nov 30, 2004 1:34 pm 
Newbie

Joined: Fri Nov 26, 2004 5:11 am
Posts: 5
I have an application which is performing the following:

1. Insert a record into a transaction table - including a number field x.
2. Update a rolling total in another table - increment by x.

The two tables are not related within the database schema.

I have not been able to determine how to ensure that the rolling total is incremented correctly (there are current access issues).

How do you configure hibernate to issue the update in the form

update table
set col1 = col1+ x
where id = xyz

or do I need to introduce some pessimistic locking to ensure correct running total.

Thanks for any help in advance.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.