I am new to hibernate and will require your assistance.
My goal is to define hibernate classes and eventually run the following SQL query
SELECT *
FROM ( SELECT * FROM {quiz_question_instances} WHERE quiz =5 ) AS mqqi
LEFT JOIN {question_usages} mqu ON mqu.id =139
LEFT JOIN {question_attempts} mqea ON mqea.questionusageid = mqu.id
AND mqea.questionid = mqqi.question
I do not know how to do Joins in hibernate. Should I create entity classes for all the tables mentioned in this query?
Also, I am using spring to display this data to a webpage. I have a dao layer defined too. How do i write this query in my dao layer?
Thanks for all the help!
EDIT:-
Attached the columns of the database tables.
Question Attempts
Question Usages
Quiz Question Instances