• 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

unidirectional relationship

Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the HF book, p432 q4:

Given the container-managed unidirectional relationship:

Foo(0-1) -> Bar(0-1)

and the object relations:


What will be true after the following code runs?


The model solution states 'b2.getFoo()==null' as one of the correct answers. But given that Foo and Bar are in a unidirectional relationship where Bar is even aware of the relationship, isn't it true that the b2.getFoo() method does not exist? In the DD, we would not declare <cmr-field> for the Bar part. So how can the method getFoo() be called on b2?
This tiny ad is guaranteed to be gluten free.
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic