I want to do an inner join in my hql query but i've got this error :
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: ( ...
SELECT new myDto(
col1, col2
FROM table1,table2
INNER JOIN (
SELECT foo, bar, ... max(nb) as numberBar
FROM table1
GROUP BY foo, bar ...
) myAlias
ON table1.foo = myAlias.foo
AND table1.bar = myAlias.bar
...
The query works in sqldeveloper