-->
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: using component mapping
PostPosted: Thu Dec 08, 2005 11:31 am 
Newbie

Joined: Sun Oct 24, 2004 8:53 pm
Posts: 6
Location: Philadelphia, PA
(1) I have an object A, and there are components B, C that would be parts of A. So when I would want to use hibernate's component feature and define B, C as components of A I must put data for B, C in table of A.

The issue is - what happens with concurrent updates of B, C ?
I would want those updates to happen and if there is only one version column shared by A, B, C this can't be achieved. There may be a version required by A because A would have its own properties too.
So to be able to achieve concurrent updates I would now have to have 3 version columns ??? Do you think this is a good idea ?

(2) Instead I may just normalize the data model and put them in separate tables with one-to-one relationships from A. To be able to use 'foreign' type generator for B, C if I want the id of A to be automatically assigned to B, C objects I have to have bodirectional relationship from B and C towards A ??? I don't want this, and so I must go with 'assigned' type generator and do the assignement myself ?

Thanks 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.