Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question 5 HF page 426

 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If an entity bean has been removed from a relationship with bean B in which cases(s) will bean A's accessor method for bean B return a non null value?

1. one to one
2. many to one
3. many to many
4etc

The answer in the book is many to many and it refers to pg 132 from the spec.

My problem with this question is that if you consider that the many to one relationshiop is from bean A to bean B (which would make sense), than answer 2 should also be correct. Or am I missing smth?

If suppose I have Developer-> Boss relation in a many to one relation (so more developers can have the same Boss, and only only one Boss), than if I remove a developer from the relation, still the accessor method from Boss (getDevelopers()) will return a non null value. The remaining developers.
Am I missing something?

Or the question should be more clearly fomrulated that: many to one relation from B to A!

Miki
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or the question should be more clearly fomrulated that: many to one relation from B to A!


Yes you are right.

But as it is not given that the relationship is one to many from A to B or B to A that means many to many is the only option that is correct.


sawan
 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sawan I think you are protecting Kathy & Bert :-)

Miki
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic