-->
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: composite foreign identity
PostPosted: Mon Aug 18, 2008 7:39 pm 
Newbie

Joined: Mon Aug 18, 2008 7:24 pm
Posts: 1
Location: colorado
I need to have a object whose identity is defined by the composite of the keys for 4 child objects. These child objects will not have a foreign key relationship with the parent, but will be defined at query time by a join.

So the object Roster, is queried by a timeStamp, and the child objects, Student, Teacher, School, Class, will very depending on what timeStamp you are querying for.

So at "1/1/2000 ..." the roster may have these 10 student, teacher joe, etc

But at "1/2/2000 ... " the roster may have 9 students and teacher pat, etc..

we can't really make a new set of rows everytime anything is changed, because the changes are too frequent, and the changes and queries are too frequent.

I am thinking of using

<composite-id
<generator class="foreign">
<param name="property">student</param>
</generator>
<generator class="foreign">
<param name="property">teacher</param>
</generator>
<generator class="foreign">
<param name="property">school</param>
</generator>
<generator class="foreign">
<param name="property">class</param>
</generator>
</composite-id>

but cannot find any examples of doing this.

Any ideas>


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.