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: Link table with additional columns (other than the ID's)
PostPosted: Thu Sep 24, 2009 7:50 am 
Newbie

Joined: Thu Sep 24, 2009 7:28 am
Posts: 1
Hello,

What's the best way to map a NxM relation that have some additional fields in the link table...

Table_User
ID
Username

Table_User_Right
ID_User
ID_Right
Type { 1 : Read, 2 : ReadWrite }


Table_Right
ID
Name

Thanks,
Catalin Andrei


Top
 Profile  
 
 Post subject: Re: Link table with additional columns (other than the ID's)
PostPosted: Fri Sep 25, 2009 2:31 am 
Expert
Expert

Joined: Thu Dec 14, 2006 5:57 am
Posts: 1185
Location: Zurich, Switzerland
You need an additional class for that and map it like that:

User m:1 UserRight 1:n Right

_________________
--Wolfgang


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.