Given the following code snippet of an EJB 3.0 entity class:
10. @Entity
11. @Table(name=”ORDERS”)
12. public class Order {….}
A developer wants to change the name of the database table for the Order entity from ORDERS to
CUSTOM, without changing the Java source code file.
Which option can the developer use?
A.
Override the name using the table subelement within the persistence unit’s persistence.xml file.
B.
This is NOT possible in a portable EJB 3.0 application. The only way to change the table name
is to change the Java source code file.
C.
Add a custommapping.xml file to the persistence unit, override the name using the table
subelement, and declare custommapping.xml in the mappinG. file element in orm.xml.
D.
Add a custommapping.xml file to the persistence unit, override the name using the table
subelement, and declare custommapping.xml in the mappinG. file element in persistence.xml.