Exit 1Z0-860 Java Enterprise Edition 5 Business Component Developer Certified Professional
Question 1 of 5
0% complete
Q1 Single choice

A User entity is in a one-to-many relationship with a Book entity.
A developer writes a query to delete users that have a first name of Fred1or 'Ginger', and writes the following Java Persistence query language statement: DELETE FROM User u WHERE u.name IN (Fred', "Ginger) If the query fails with a PersistenceException, what can be the cause?

  • A

    The syntax of the query is NOT correct.

  • B

    Thequerycauses a foreign key integrity constrainttobe violated.

  • C

    The database doesNOThave any userswith thenameFred'or 'Ginger'.

  • D

    Theentities corresponding to the userswiththe nameFred'or'Ginger' arealreadybeing managedbythe persistencecontext.

Previous Next