| Author |
Dout in @JoinColumn annotation
|
Satyajeet Kadam
Ranch Hand
Joined: Oct 19, 2006
Posts: 202
|
|
I am having Person table that is having one to one relationship with PersonDetail table.
Person.java
Perondetails
personDetailId is primary key in the Persondetail class and it is mapped to the personDetailId in Peron class which is foregin key.
I am getting the exception as below
Q1) Please kindly let me know what has gone wrong in using @JoinColumn?
|
 |
Frits Walraven
Rancher
Joined: Apr 07, 2010
Posts: 742
|
|
Hi,
Q1) Please kindly let me know what has gone wrong in using @JoinColumn?
The problem is not with the @JoinColumn, but with the @OneToOne annotation. Just place the @OneToOne above the getter:
Regards,
Frits
|
 |
 |
|
|
subject: Dout in @JoinColumn annotation
|
|
|