Oracle
1Z0-860 · Question #144
1Z0-860 Question #144: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-860 to reveal the answer and full explanation for question #144. The question stem and answer options stay visible for context.
Question
A User entity is in a one-to-many relationship with a Book entity. In other words, a developer can reach the collection of books that a User instance myUser has by using the path expression"myUser.books". A developer wants to write a Java Persistence query that returns all users that have only two books. Which two are valid queries that return this information? (Choose two.)
Options
- ASELECT u FROM User u WHERE SIZE(u.books) = 2
- BSELECT u FROM User u WHERE COUNT(u. books) = 2
- CSELECT u FROM User u WHERE(SELECT COUNT(b) FROM u.books b) = 2
- DSELECT u FROM User u WHERE (SELECT SIZE(b) FROM u.booksb)= 2
Unlock 1Z0-860 to see the answer
You've previewed enough free 1Z0-860 questions. Unlock 1Z0-860 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.