I have two objects, Student and Book. Student has @OneToMany relationship with Book, and Book has only id, name, and publishYear. What i want is to return from Query is this:
select s.name,
b.name,
b.publishYear
from Student s
inner join Book b on s.id = b.studentId
How to return s.name, b.name and b.publishYear with map, so i don't want to return a List but a map. How to do that?