HI,
I am using JPA on Wildfly 8.0 with Hibernate 4.3, here's what I'm trying to do:
I have a ManyToOne in relationship class C that I want to reference yet another OneToOne relationship in class B which references a column in class A.
So when I try it, I get the error: A Foreign key refering com.amyaj.emedical.entities.patient.ehr.B from com.amyaj.emedical.entities.patient.ehr.C has the wrong number of column. should be 0 Which is the exact same problem exposed here 3 years ago: http://stackoverflow.com/questions/3653315/hibernate-foreign-key-has-the-wrong-number-of-column-should-be-0
So, if I understand, a relationship is not considered as a column (in my case: the OneToOne relationship in class B).
Is there a turnaround for this? I would like to avoid the redundancy of having two identical columns in the database (one for the ID and the other for the OneToOne)
Thanks a lot.
Edit: Typo
|