Oracle
1Z0-860 · Question #84
The Java Persistence API defines the Query interface. Which two statements about the Query.executeUpdate method are true? (Choose two.)
The correct answer is A. It must always be executed within a transaction. C. It throws an HlegalStateException if called on a Query instance created with a Java Persistence. See the full explanation below for the reasoning.
Question
The Java Persistence API defines the Query interface. Which two statements about the Query.executeUpdate method are true? (Choose two.)
Options
- AIt must always be executed within a transaction.
- BIt throws a PersistenceException if no entities were updated.
- CIt throws an HlegalStateException if called on a Query instance created with a Java Persistence
- DAll managed entity objects corresponding to database rows affected by the update will have their state
How the community answered
(58 responses)- A72% (42)
- B17% (10)
- D10% (6)
Community Discussion
No community discussion yet for this question.