File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

One-To-One Bidirectional - Owning Side & mappedBy property?

 
Sandeep Vaid
Ranch Hand
Posts: 392
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[P-276] of EJB3 In Action Book states:
"In a bidirectional relationship, the owning side is the entity that stores the relationship in its underlying table."

I guess by relationship it means the Foreign Key. If this is the case, then in @PrimaryKeyJoinColumn, BillingInfo will
be the owning entity and hence the mappedBy should be defined for User.billingInfo field?

[P-277] of EJB3 In Action Book:
What about bidirectional OneToOne using @PrimaryKeyJoinColumn? Does it uses mappedBy property of @OneToOne annotation?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic