-->
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: join table problem
PostPosted: Tue Feb 06, 2007 2:13 pm 
Newbie

Joined: Tue Dec 26, 2006 2:57 am
Posts: 11
i've following tables..

LOGIN_TABLE
UID PK
EMP_ID
USERNAME
PASSWORD

ROLE_MASTER_TABLE
RM_ROLE_ID PK
RM_ROLE_DESC

USER_ROLE_TABLE
UR_UID PK, FK(refers LOGIN(UID))
UR_ROLE_ID FK(refers ROLE_MASTER(RM_ROLE_ID))

some one plz tell me how to write hibernate mappings for the above tables asap....


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 06, 2007 6:37 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Did the refdocs not help you? You need a <set> (section 6.2) with a table="USER_ROLE_TABLE" attribute, containing a <key> (section 5.1.19) and a <one-to-many> (section 6.2.5) or <many-to-many> (6.2.4) association, as applicable.

_________________
Code tags are your friend. Know them and use them.


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.