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

Page 432

 
ayman Ab
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the question it says
Foo(0-1) -> Bar(0-1)
f1->b1
f2->b2
after calling f2.setBar(f1.getBar());
The answer says
b2.getFoo() == null
now i guess the arrow -> means unidirection that means no cmr field that represents foo .i.e the method doesn't exists
Am i right ?
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ayman,
It's a mistake mentioned in the Unconfirmed error reports and comments from readers (part of HF EJB's errata). (I remember this one because I put it there myself) .
Regards,
Phil.
[ January 01, 2004: Message edited by: Philippe Maquet ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ayman",
it appears that you have changed your display name from a valid one to an invalid one according to the JavaRanch naming rules. Please change it back soon since accounts with invalid display names get deleted, often without warning.
thanks,
Dave.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In the question it says
Foo(0-1) -> Bar(0-1)
f1->b1
f2->b2
after calling f2.setBar(f1.getBar());
The answer says
b2.getFoo() == null
now i guess the arrow -> means unidirection that means no cmr field that represents foo .i.e the method doesn't exists
Am i right ?

after calling f2.setBar(f1.getBar());
f1->null
f2->b1
b1 -> f2
b2 -> null
Case 1 : 1 and 1 : many -> After you call above function, container is copy data from source to destination and delete this item in source.
But
Case N : 1 , N :N -> After you call above function, container is copy data from source to destination only , not delete item in source
 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by somkiat puisungnoen:

after calling f2.setBar(f1.getBar());
f1->null
f2->b1
b1 -> f2
b2 -> null

How can
b1 -> f2
b2 -> null
in a uni-directional relationship from foo to bar.
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Phillipe's right!
Good catch, though. Shows that you're paying attention
Phillipe and Keith have found several issues, so they'll keep you on track
We're still trying to get the complete errata updated on the O'Reilly site to change some things from unconfirmed to confirmed, but for now -- most everything is up there on the O'Reilly site in one way or another. Your best bet is to ask the questions here.
Remember, Bert and I are getting on a plane in a few minutes and we will be gone until January 10th, so I'm relying on the rest of you again to help each other out. If there are any issues that you want me to resolve for certain, it'll have to wait, but remember--the spec is always the final word.
cheers and have fun,
Kathy
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic