HQL: Is it possible to perform an INNER JOIN on a subquery?

前端 未结 1 1160
情书的邮戳
情书的邮戳 2020-12-01 16:59

\"Diagram\"

The diagram above is a simplified version of the database structure that I use to log item location

1条回答
  •  醉酒成梦
    2020-12-01 17:10

    http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/queryhql.html#queryhql-subqueries

    Note that HQL subqueries can occur only in the select or where clauses.

    You can rewrite the query so that the subquery is part of the where clause instead. Referencing the l.idItem in the subquery

    0 讨论(0)
提交回复
热议问题