-->
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.  [ 1 post ] 
Author Message
 Post subject: How to understand the 'many-to-one' in composite-element ?
PostPosted: Wed Oct 06, 2004 9:04 pm 
Regular
Regular

Joined: Tue Jul 13, 2004 2:27 am
Posts: 73
Location: Singapore
Hi,
A question on the 'many-to-one' in ternary composite-element. Let's say I have this mapping:

<class name="Program" table="PROGRAMS">
<id column="PROGRAM_ID" ......>

<set name="userRoles" table="PROGRAM_USER_ROLE" lazy="true">
<key column="PROGRAM_ID"/>
<composite-element class="UserRoles">
<many-to-one name="user" column="USER_ID" class="User"/>
<many-to-one name="role" column="ROLE_ID" class="Role"/>
</composite-element>
</set>
</class>


So what's the relationship between Program and UserRoles ? what's the relationship between UserRole and User, Role ?


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

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.