-->
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: Add a property in a class from a different table
PostPosted: Wed Dec 21, 2005 11:42 am 
Beginner
Beginner

Joined: Wed Dec 14, 2005 10:32 am
Posts: 20
Hi All,

I have been trying to figure out how to acheive this for a while now and could not figure out.

Any help is greatly appreciated.

I have create a class say 'Account' having attributes of all the columns of the table 'account'.

My question is how do I add another property say 'itemNo' in the class 'Account' whose value should be coming from a different table's column 'ITEM_NO' from table 'item'. Table 'account' and 'item' have a foriegn-key relationship on the column 'ACCOUNT_ID'.


Thanks in advance.

-Jam


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 22, 2005 8:48 am 
Senior
Senior

Joined: Tue May 10, 2005 9:00 am
Posts: 125
See Hibernate documentation, 5.1.17, the <join> tag.

This is exactly what you want.


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.