[jboss-user] [EJB 3.0] - Re: Problem with composite Primary key which is also a forei

oskar.carlstedt do-not-reply at jboss.com
Mon Apr 23 10:53:51 EDT 2007


Hi!

The @Id annotation will annotate the primary key of your class. The parent id is not the primary key of your class, it is a foreign key, but an @Id in the parent class. Remove @Id from the parentId.

If you want to use composite keys, take a look here http://docs.jboss.org/ejb3/app-server/tutorial/composite/composite.html


Kind Regards
Oskar


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

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



More information about the jboss-user mailing list