This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Misleading Inheritance Model names - Java Beat questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "Misleading Inheritance Model names - Java Beat questions" Watch "Misleading Inheritance Model names - Java Beat questions" New topic
Author

Misleading Inheritance Model names - Java Beat questions

Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
It asks

8) Which of the following are valid Inheritance hierarchy models specified in the
Java Persistence Specification?

a. Table per concrete class hierarchy
b. Table per subclass hierarchy
c. Single table per class hierarchy
d. All the above


a is correct. b is incorrect. But the answers say C is also correct. C would have been correct if it was 'single table hierarchy'. The 'per class' term is misleading! Even MZ guide uses this term!



SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Even MZ guide uses this term!

This guide is made from the specification : 2.1.10.1 Single Table per Class Hierarchy Strategy


[My Blog]
All roads lead to JavaRanch
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
Single Table Per Class means 1 class table! But the model actually uses 'single table for all entity classes in an heirarchy'

found the 'per class' term a bit
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

found the 'per class' term a bit

It's 'per class hierarchy', not 'per class'
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
I was interpreting it as (single table per class) heirarchy, taking heirarchy to be synonymous to 'model'

...it's actually single table per (class heirarchy) !!

Thanks!!
Sameer Ali
Greenhorn

Joined: Dec 05, 2008
Posts: 7
a and c are valid
 
jQuery in Action, 2nd edition
 
subject: Misleading Inheritance Model names - Java Beat questions