-->
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: How to handle bidirectional association
PostPosted: Thu Oct 23, 2008 6:51 am 
Newbie

Joined: Wed Oct 22, 2008 10:20 pm
Posts: 11
Hi,

I have 2 tables namely 'JOB' & PERSON'. There is a one to many relationship
between the 2 tables that is, different person can hold the same JOB.
E.g. Tom and Jenny are both accountant.

If given the job title (field in JOB table), I am able to find the list
of people holding the same job. How if I am given only the personID (field in PERSON table)
or name, how can I find the job title of that specific person?

I tried the bidirectional association method but I encountered
the following error:

"An association from the table PERSON refers to an unmapped class JOB."


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 23, 2008 7:29 am 
Regular
Regular

Joined: Mon Jan 22, 2007 10:32 am
Posts: 101
Post your mappings. My guess, your mapping are not correct.

_________________
Please rate this post if you find it helpful


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.