Oracle
1Z0-860 · Question #127
The execution of the find method in the following code throws an exception: 11. em.find(Customer.class, custld); 12. //Where em is a reference to a extended scoped entity manager. Which scenario can…
The correct answer is D. The data type of custld is NOT a valid type for the Customer entity primary key. See the full explanation below for the reasoning.
Question
The execution of the find method in the following code throws an exception: 11. em.find(Customer.class, custld); 12. //Where em is a reference to a extended scoped entity manager. Which scenario can cause the exception?
Options
- AThe find method was called without a transaction.
- BThe entity corresponding to the requested primary key has been removed.
- CThe entity corresponding to the requested primary key has been detached.
- DThe data type of custld is NOT a valid type for the Customer entity primary key.
How the community answered
(40 responses)- A5% (2)
- B10% (4)
- C3% (1)
- D83% (33)
Community Discussion
No community discussion yet for this question.