Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

[jboss-user] [EJB 3.0] - Map multiple rows to one object?

scott.stark@jboss.org

2007-05-04


Is it possible to map multiple rows to one object? Here's a sample table:

User_Preference_Value
-----------
user_id
pref_id
value

The combination of (user_id, pref_id) is not unique. A User can have multiple values for some preferences. I'd like to have a single UserPreference value whose compound key is (user_id, pref_id), with a collection of Strings for Value.

Is this possible?

I'd rather not have to create a User_Preference table with user_id/pref_id just to satisfy the mapping needs.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043383#4043383

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043383
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.