Register / Login
Win a copy of
Java 9 Revealed
this week in the
Features new in Java 9
this forum made possible by our volunteer staff, including ...
Roel De Nijs
Stephan van Hulst
Object Relational Mapping
One-to-One Mapping in Hibernate
posted 9 years ago
I want to declare a One-To-One association to the same class.
Person -> substiude -> Person
my mapping is:
<property name="substituteId" unique="true"/>
<one-to-one name="substitude" class="Person"
But no foreign key is genrated to the substitudeId.
What is my mistake?
Can someone help?
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
Boost this thread!
Hibernate: Foreign key must have same number of columns as the referenced primary key
Foreign key must have same number of columns as the referenced primary key
hibernate creating duplicate ForeignKey index
An hibernate error about one-to-one