Hi,
Last night I could not find out how to use SQLQuery.join(SubQueryExpression, Path) function. The SubQuery would have results with several columns that would be used in the main query. What should be the generic type of the Path parameter?
A simple example like the following would be great in the documentation.:
SELECT userSubQuery.userName, userSubQuery.age
FROM company
INNER JOIN (SELECT companyId, userName, age FROM user) AS userSubQuery ON userSubQuery.companyId = company.companyId
The statement above is only an example. I know that it could be simplified to avoid subquery.
I could not answer the following questions by evaluating the QueryDSL API:
- What should be the generic type of the Path when multiple columns are used from the SubQuery?
- How should be the Path instance created?
- How can I use the columns in the main query?
Thanks,
Balazs