-->
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: Table mapping with annotations
PostPosted: Thu Oct 22, 2009 12:32 pm 
Newbie

Joined: Wed Oct 21, 2009 6:24 pm
Posts: 3
Hi, I would like to understand the how Table mapping can be done with Hibernate annotation.
I know how to work with one table.If I have multiple table while fetching data then how to map those two tables.
Ex :
Table1:
int emp_id
char name

Table 2
int dept_id
int emp_id
char department_name
char location.

My result should be like this :

select t2.dept_id,t1.name,t2.department_name from table1 t1,table2 t2 where emp_id = '10002";
Please let me know how to do this.Any examples.Appreciate your time and help.


Top
 Profile  
 
 Post subject: Re: Table mapping with annotations
PostPosted: Mon Jan 04, 2010 1:53 pm 
Newbie

Joined: Wed Oct 21, 2009 6:24 pm
Posts: 3
Any Help ? Please


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.