Oracle
1Z0-860 · Question #289
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?
Exhibit
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
(28 responses)- A7% (2)
- B14% (4)
- C4% (1)
- D75% (21)
Community Discussion
No community discussion yet for this question.
