-->
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: Mapping a Map
PostPosted: Sat Mar 27, 2004 4:31 pm 
Newbie

Joined: Wed Feb 11, 2004 1:03 am
Posts: 3
Relatively new to hibernate and looking for some ideas here...

I have a number of objects in my object model that may or may not contain attributes. So a User may or may not have a Favorite Color.

I would like to model this relationally with a tie table. Where I'd have a User table and an Attribute table and then a User->Attribute table.

In Java, I'd like to map this as a Map. (User.getAttributes().get("favoriteColor"))

Is there a way to get hibernate to do this automatically? I'm using xdoclet if that matters.

btw, I have this implemented without using maps, but it requires the client to loop through attributes all the time. I could build the map in the User object if worse comes to worse.

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 29, 2004 6:03 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
<map>...

_________________
Emmanuel


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.