Hi, here is my delimma,
I have three tables: User, Group, and UserInGroup. User has a HashMap Java object of all Groups that the User is a member of (as decided by the UserInGroup table.) I would like to keep the HashMap structure as I am grafting Hibernate on to some earlier code that I know works.
Can someone tell me how to put this structure into my Hibernate .hbm.xml file? I have already read the documentation online, but I learn a lot easier with an example in front of my face so please don't tell me to RTFM. I've RTFM and I got an "Element "map" requires additional elements." error.
For the purposes of this example User has a column called User_ID, Group has a column called Group_ID. Each are unique primary keys. The UserInGroup table has columns called User_ID and Group_ID. The combination of User and Group is unique in the UserInGroup table.
Thanks!
|