Which of the following statement is correct about an object/relational mapping file?
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 220.127.116.11.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>.