File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes One-To-One Bidirectional - Owning Side & mappedBy property? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "One-To-One Bidirectional - Owning Side & mappedBy property?" Watch "One-To-One Bidirectional - Owning Side & mappedBy property?" New topic
Author

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

Sandeep Vaid
Ranch Hand

Joined: Feb 27, 2006
Posts: 390
[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
 
subject: One-To-One Bidirectional - Owning Side & mappedBy property?
 
Similar Threads
OneToOne Bidirectional Using @PrimaryKerJoinColumn
Naive question on "MappedBy" attribute of @OneToMany
@ManayToMany
@mappedBy
One-To-One Bidirectional - @PrimaryKeyJoinColumn