-->
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: Odd many-to-many setup.
PostPosted: Thu May 20, 2004 1:29 pm 
Beginner
Beginner

Joined: Thu Apr 29, 2004 9:36 am
Posts: 28
I'm setting up a system that has a collection of groups, users and modules. There exists a m2m relationship between groups-users, user-modules, and groups-modules. This allows someone to set the permissions by group, but add additional modules to a single user. I'm using association tables to acoomplish the m2m mappings.

Right now, I'm running two finds and I'm not sure this is the best approach. The first find ask for modules by userId, the second find asks for users by groupId. Both results are stored in a list and then converted into a set, to remove duplicates. I'm wondering if any has suggestions on a better way to do this? Do I need to restructure my schema, mod my hibernate code, or is this as good as it gets?

Cheers,
Tyler Pitchford


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.