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
|