[jboss-user] [EJB 3.0 Users] - Problem Joining 3 Tables

mwilmes do-not-reply at jboss.com
Thu Oct 22 15:45:31 EDT 2009


I have two Entities A and B each with a simple primary key idA and idB. I join them using a third table AB that has a composite primary key using an embedded primary key class ABPk. So far it works fine.

Now I got another table C with a simple primary key idC involved that has to be joined with AB using another table ABC. So this last table has a composite primary key ABCpk that consists of the parts idC and ABPk which itself consists of idA and idB.

All composite primary keys use the @Embeddable Annotation and are imbedded using @EmbeddedId similar to what is recommended in https://www.jboss.org/community/wiki/EJB3relationships

My problem is that on ABC I can't activate the @ManyToOne Annotation that references AB. On deployment this gives me a NullPointerException.

I am using JBoss 4.2.3.GA with Sun Java


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

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

More information about the jboss-user mailing list