nerdexam
Oracle

1Z0-860 · Question #43

According to the Java Persistence API, a managed entity instance X becomes removed by invoking the remove method on it or when it is a target of a cascaded remove operation. Which statement is true?

The correct answer is C. If X is a new entity the remove operation is cascaded to entities referenced by X. See the full explanation below for the reasoning.

Question

According to the Java Persistence API, a managed entity instance X becomes removed by invoking the remove method on it or when it is a target of a cascaded remove operation. Which statement is true?

Options

  • AAfter an entity has been removed its state will be restored to the Java defaults.
  • BIf a detached entity Y references Xthe HlegalStateException will be thrown.
  • CIf X is a new entity the remove operation is cascaded to entities referenced by X.
  • DA removed entity X will be guaranteed to be removed from the database when the remove method

How the community answered

(18 responses)
  • A
    6% (1)
  • B
    6% (1)
  • C
    72% (13)
  • D
    17% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice