• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Hibernate one to many mapping with foreign key association  RSS feed

Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am following the example given in  the below link


In this there is one to many relation  between Employee and Account. Employee is the one side of the relationship. Account is the many side of the relationship.

Here the extra association column needs to be generated on the Account side but the JoinColumn annotation is used in the Employee entity.

Is the joincolumn annotation not supposed to be used on the owning side(side responsible for association column update) which is the Account entity since it is the many side of the relationship and defaulting to the owning side(since it is the many side of the relationship)?

The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
global solutions you can do at home or in your backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!