Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • 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
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

final mock question 57

 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All:
On page 676 of HF, choice c is checked for question 57. I don't think that it should be checked because it is not entirely correct. The fact that two entity objects have the same primary key is not a sufficient condition for isIdentical() to return true, the two entity objects must have come from the same home as well.
This can be confirmed by the following from page 120 of the spec:

Every entity object has a unique identity within its home. If two entity objects have the same home and the same primary key, they are considered identical.


Am I correct in my analysis?
Thanks
[ February 08, 2004: Message edited by: Keith Rosenfield ]
[ February 08, 2004: Message edited by: Keith Rosenfield ]
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i think the mock question assumes the objects are from the same home, otherwise it makes little no sence to compare 2 different types of object

[ February 08, 2004: Message edited by: Micheal Lau ]
 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would not make that assumption. If it is the case that both entity objects came from the same home then it should be stated. Whether it makes sense or not is irrelevant. If something is not explicitly spelt out in the question then as far as I'm concerned you can not assume it to be the case.
Just my 2 cents.
 
Micheal Lau
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i agree we should not make any assumption
hope the real test won't have such confusing question
 
I can't beleive you just said that. Now I need to calm down with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic