[jboss-user] [EJB 3.0] - Composite primary key from foreign keys

xmaniac do-not-reply at jboss.com
Wed Nov 29 12:32:27 EST 2006

I'm unable to figure out how to implement this.

I have 3 tables in my DB: Team (surrogate pk), Period (surrogate pk) and TeamPeriods (pk composed of both foreign keys).

I need to create an entity from the third table so I can then query the Team objects and receive a collection of TeamPeriods (and then Periods if needed). I don't want to create a surrogate key and an index for this table.

I've seen the @Embeddable annotation but I'm still unsure on how to apply it in this case.

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

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

More information about the jboss-user mailing list