Quantcast
Channel: getting result set into DTO with native SQL Query in Hibernate - Stack Overflow
Viewing all articles
Browse latest Browse all 2

getting result set into DTO with native SQL Query in Hibernate

$
0
0

I have a query like below

select f.id, s.name, ss.namefrom first fleft join second s on f.id = s.idleft join second ss on f.sId = ss.id

If I could use HQL, I would have used HQL constructor syntax to directly populate DTO with the result set.But, since hibernate doesn't allow left join without having an association in place I have to use the Native SQL Query.

Currently I am looping through the result set in JDBC style and populating DTO objects.Is there any simpler way to achieve it?


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images