This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dout in @JoinColumn annotation

 
Satyajeet Kadam
Ranch Hand
Posts: 224
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2171
57
Android Chrome Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic