Which query returns a Collection of fewer than four elements?

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, reader1
has booka and bookb, while reader2 has bookc and bookd. Which query returns a Collection of
fewer than four elements?

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, reader1
has booka and bookb, while reader2 has bookc and bookd. Which query returns a Collection of
fewer than four elements?

A.
SELECT b.reader FROM Bookb

B.
SELECT r FROM Book b INNER JOIN b.reader r

C.
SELECT r FROM Reader r INNER JOIN r.books b

D.
SELECT r from Book b LEFT JOIN b.reader r LEFT JOIN FETCH r.books



Leave a Reply 0

Your email address will not be published. Required fields are marked *