I'm trying the composite entity the other way round now. I have a "Contact" entity which contains the contact details for a Person at a location. ie. job title, email, phone number etc.
The Contact links to the Person entity which contains personal details. So on the Contact entity, there is an @ManyToOne Person. And so on the Contact table there is a person_id field pointing to the Person row. I'm trying to have Contact as the primary Table, and pulling Person as the secondary table using @SecondaryTable(name="Person", [EMAIL PROTECTED](name="id", referencedColumnName="person_id")) It's just a basic join on person_id->Person.id, but the config doesn't like it, I get | org.hibernate.AnnotationException: SecondaryTable JoinColumn cannot reference a non primary key | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054020#4054020 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054020 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user