• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic