-->
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: Limiting the children in a relationship
PostPosted: Sat Feb 05, 2011 5:13 pm 
Newbie

Joined: Thu Feb 25, 2010 4:55 pm
Posts: 2
I am sure there has to be a pattern for this, but I have had no luck looking for it. Assume a one to many relationship from A to B. Assume A has an attribute called capacity. I want to ensure that A had no more instances of B that the attribute A.capacity. If I check in memory, I have a race condition when two threads get to (A.capacity - 1).

Is there a patten for a conditional insert based on an attribute in a parent?

Thanks in advance.

-- bk


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.