[jboss-user] [EJB 3.0] - Re: EJB 3 OneToMany with Composite Key

waynebaylor do-not-reply at jboss.com
Wed Jul 4 21:46:12 EDT 2007

if i remember correctly, the @OneToMany relationship will, by default, create a table for the "many" side which will contain a foreign key referencing the "one" side. 

so, since messageId is the PK for CommsMessage the table representing CommsMessageRecipient will have two columns named messageId: one as the FK referencing CommsMessge and another as part of its own PK.

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

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

More information about the jboss-user mailing list