• 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

About object relational mapping file requirements from a free Whizlab test  RSS feed

 
Ranch Hand
Posts: 1710
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I found a free Whizlab mock exam , there is a question and answer:


Which of the following statement is correct about an object/relational mapping file?
Choose one.
A. It must be named orm.xml
B. It must be in the META-INF directory in the root of the persistence unit.
C. It must be on the classpath
D. It must be in location specified in either option B or C.
E. None of the above.

Given answer is A.

As 8.2.1.6.2, an object/relational mapping XML file named orm.xml may be
specified in the META-INF directory, in the root of the persistence unit
or in the META-INF directory of any jar file referenced by the persistence.xml.
Alternatively, or in addition, one or more mapping files may be referenced
by the mapping-file elements of the persistence-unit element.
These mapping files may be present anywhere on the class path.



I think the correct answer should be E because of the following reasons:
for A, object/relational mapping file may be called some other names, not necessarily called orm.xml.
for B, if it is called orm.xml, then it must be in META-INF in the root of the persistence unit.
for C, if it is called something else, it must be in the classpath specified by <mapping-file> in
persistence.xml. Or, if it is called something else, it may be in the META-INF directory of the root persistence unit being specified by <mapping-file>.

 
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!