Oracle
1Z0-860 · Question #196
Given the following code snippet of an EJB 3.0 entity class: 10.〦ntity 11. @Table(name="ORDERS") 12. public class Orderj.... } A developer wants to change the name of the database table for the…
The correct answer is D. Add a custommapping.xml file to the persistence unit, override the name using the table subelement. See the full explanation below for the reasoning.
Question
Given the following code snippet of an EJB 3.0 entity class: 10.〦ntity 11. @Table(name="ORDERS") 12. public class Orderj.... } 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?
Options
- AOverride the name using the table subelement within the persistence unit's persistence.xml file.
- BThis is NOT possible in a portable EJB 3.0 application.
- CAdd a custommapping.xml file to the persistence unit, override the name using the table subelement,
- DAdd a custommapping.xml file to the persistence unit, override the name using the table subelement,
How the community answered
(43 responses)- A7% (3)
- B14% (6)
- C5% (2)
- D74% (32)
Community Discussion
No community discussion yet for this question.