-->
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.  [ 2 posts ] 
Author Message
 Post subject: Multiple Relations, Same Object.
PostPosted: Wed May 19, 2004 1:42 pm 
Newbie

Joined: Mon May 17, 2004 12:21 pm
Posts: 2
I have a claim table that has patient_id and employee_id. Both of these links link to the patient table because the are identical, and in many cases the employee is also listed as the patient. So, in the patient class I would like to retrieve all the claims for the given patient, something like getClaims()

I setup getClaimsAsEmployee and getClaimsAsPatient already:

Code:
<set name="claimsAsPatient" lazy="true">
    <key column="patient_id" />
    <one-to-many class="com.eldoserv.esdos.db.Claim" />
</set>
<set name="claimsAsEmployee" lazy="true">
    <key column="employee_id" />
    <one-to-many class="com.eldoserv.esdos.db.Claim" />
</set>


but I would like to make 1 additional set that links the patient to patient_id or employee_id ... How can I accomplish this? I would like to have it in the hbm file so that I can use it's values in queries, etc...

Thanks,

Jeremy


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 19, 2004 1:46 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Can't do that

_________________
Emmanuel


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

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.