• 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

JPA

 
Ranch Hand
Posts: 72
MySQL Database AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to JPA.I am confused in Directionality.
If we have two entities say Employee and Project.what does it really mean they are bidirectional relationship??
 
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If they both have a relationship to each other, then they have a bi-directional relationship.

i.e.
 
shashank dwivedi
Ranch Hand
Posts: 72
MySQL Database AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

James Sutherland wrote:If they both have a relationship to each other, then they have a bi-directional relationship.

i.e.



Shashank Dwivedi wrote: yes but that means many to many is always bidirectional right?

 
shashank dwivedi
Ranch Hand
Posts: 72
MySQL Database AngularJS Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

shashank dwivedi wrote:

James Sutherland wrote:If they both have a relationship to each other, then they have a bi-directional relationship.

i.e.



Shashank Dwivedi wrote: yes but that means many to many is always bidirectional right?



Shashank Dwivedi wrote: Ok I think I got it.
Can we check Directionality with -HAS- test.
for example, say we have two entities Employee and Address.Now Employee has a address but address don't need to have a Employee so it is uni-directional.
And again if we have two entities Employee and Project.Now Employee has project and project also has employee so it is a bi-directional mapping.
Am I Correct??

 
Do Re Mi Fa So La Tiny Ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic