I have a query like below
select f.id, s.name, ss.name
from first f
left join second s on f.id = s.id
left join second ss on f.sId = ss.id
If I could have used HQL, I would have used constructor syntax to directly populate DTO with the result set. But, since hibernate don't allow left join without having an association in place I have to use the Native Query.
Currently I am looping through the result set in JDBC style and populating DTO objects. Is there any simpler way to achieve it?