• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Page 432

 
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 ?
 
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 ]
 
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.
 
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
 
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.
 
Cowgirl and Author
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
 
You got style baby! More than this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic