[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Map multiple rows to one object?

swjackson do-not-reply at jboss.com
Tue May 8 13:58:08 EDT 2007


If I am understanding your question you need to have the relationship in your User POJO that returns the collection. 

in your setter method add the annotation for @JoinTable to enforce the sql relationship you want

you also may have to implement Comparable to enforce the collection you want on UserPreference.

Another approach that may be more effective is to use a NamedQuery



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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044008



More information about the jboss-user mailing list