Get your CodeRanch badge!*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes SecondaryTable annotation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "SecondaryTable annotation" Watch "SecondaryTable annotation" New topic

SecondaryTable annotation

Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
Question number 30 of WhizLabs diagnostic exam uses SecondaryTable annotation. Will this annotation appears on the real exam too?
Raf Szczypiorski
Ranch Hand

Joined: Aug 21, 2008
Posts: 383
Didn't see it on the exam. But it is pretty simple - it just tells you that the entity spans many tables, and when a field is mapped, you need to tell which table it is mapped to, but it is only needed when the field actually is in any of the secondary tables (yes, you can have more than 1) - the primary table is the default.
Treimin Clark
Ranch Hand

Joined: Nov 12, 2008
Posts: 757
Thanks Raf.
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Regarding concern about real exam, as I know nobody see every question, questions are randomly selected from pool.

SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
I agree. Here's the link:
subject: SecondaryTable annotation
Similar Threads
Question regarding use of annotation @SecondaryTables
How to stop inserting in table defined in @SecondaryTable
Different @SecondaryTable and relationship annotation
Annotation may come ???
Use of @SecondaryTable in EJB3.0