• 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 ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

achieve the same using one to many bidirectional as for many to one unidirectional

 
Ranch Hand
Posts: 1647
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Suppose we have 2 tables: Vendor and Customer such that one vendor can have multiple customers.


One to many unidirectional: If we do save operation on Vendor then customer also gets saved. (provided cascading is used)

many to one unidirectional: If we do a save operation on customer, vendor also gets saved.(provided cascading is used)

one to many bidirectional: If we do save operation on Vendor then customer also gets saved and if we do a save operation on customer, vendor also gets saved.


My confusion is that is the many to one unidirectional case not already covered in one to many bidirectional case. So what we can achieve using many to one unidirectional we can achieve using one to many bidirectional.

thanks
 
    Bookmark Topic Watch Topic
  • New Topic