Oracle
1Z0-860 · Question #293
A Reader entity has a one-to-many, bidirectional relationship with a Book entity. Two Reader entities are persisted, each having two Book entities associated with them. For example, reader! has…
The correct answer is C. SELECT r FROM Reader r INNER JOIN r.booksb. See the full explanation below for the reasoning.
Question
A Reader entity has a one-to-many, bidirectional relationship with a Book entity. Two Reader entities are persisted, each having two Book entities associated with them. For example, reader! has booka and bookb, while reader2 has bookc and bookd. Which query returns a Collection of fewer than four elements?
Options
- ASELECT b.reader FROM Book b
- BSELECT r FROM Bookb INNER JOINb.readerr
- CSELECT r FROM Reader r INNER JOIN r.booksb
- DSELECT r from Bookb LEFT JOIN b.readerr LEFTJOIN FETCHr.books
How the community answered
(22 responses)- A5% (1)
- B9% (2)
- C73% (16)
- D14% (3)
Community Discussion
No community discussion yet for this question.