The problem I have is that, in the table, the combination of user_id and preference_id are not unique. I haven't found any way to have distinct(user_id,preference_id) as the primary key while also rolling up the multiple rows into a collection based on the value column.
Frankly, I don't think Hibernate can support this, unless there's some sort of custom PK mechanism that could be provided. The simple (but ugly) solution is to create a User_Preference table with just (user_id,preference_id) columns. Then I can map the UserPreference object to that and do the collection mapping for the values. I was just trying to avoid having to create an extra table that adds no value. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044019#4044019 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044019 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
