• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

HFEJB question 46 from mock exam

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a doubt regarding the following question from HFEJB.
What's true about an entity bean's primary key?
A Primary key fields must be cmp-fields
B Setter methods for fields associated with primary key must not be exposed thorugh client view
C If two entity objects have the same home and the same primary key, they are considered to be identical
D The getPrimaryKey() method can be invoked on references to only remote home interfaces, not local home interfaces

My answers were A,B, C

However the correct solution given are B & C.The reason given for A is that a compound key can be a primary key

I am unable to understand why A is a correct option, as the primary key is a subset of cmp fields.Even if a compound key is used, it needs to consist of cmp fields.Hence I had selected option A.

Can you please explain this?

Regards,
Paresh Vernekar
 
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check here.
 
I will open the floodgates of his own worst nightmare! All in a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic