-->
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.  [ 3 posts ] 
Author Message
 Post subject: Simple mapping of Map<Object, List<Object>> kick
PostPosted: Fri Jan 05, 2007 11:50 am 
Newbie

Joined: Thu Aug 24, 2006 8:27 am
Posts: 10
I had assumed this would be a simple mapping (via XML) but it is eluding me so far.

Nutshell: table consists of userid, appid, roleid. I want each User to have a Map<App, List<Role>> where Apps and Roles are what you'd expect.

Is this possible? I've tried a lot of combinations and so far I've been SOL.

If this is a stupid mistake, cool; if it's a stupid question, not so cool, 'cuz I kinda want to do this.

TIA!

Dave


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 05, 2007 12:46 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
Map<App, List<Role>>

Have you tried just mapping the List<Role> and App as attributes by themselves, then adding some helper methods to the object which returns them as a Map<App, List<Role>>

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject: ...
PostPosted: Fri Jan 05, 2007 12:50 pm 
Newbie

Joined: Thu Aug 24, 2006 8:27 am
Posts: 10
No, I haven't, although I've been working on various workarounds... I'm open to any suggestions at this point. Also, not that it matters, I'm using Java 1.4 but illustrating with 1.5, so my generated classes don't necesarily give me the information I need without actually compiling and running them :/

One "problem" is that I'm using the Hibernate tools and would prefer neither to stop using them nor subclass a generated class, but it might come down to that.

This has been kicking my ass for a day now :/

Thanks,
Dave


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.