nerdexam
Oracle

1Z0-860 · Question #70

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, readeM has booka…

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, readeM 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 BookbINNER JOINb.readerr
  • CSELECT r FROM Reader r INNER JOIN r.booksb
  • DSELECT r from BookbLEFT JOIN b.readerr LEFTJOINFETCHr.books

How the community answered

(28 responses)
  • A
    4% (1)
  • B
    11% (3)
  • C
    79% (22)
  • D
    7% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice