我有这样的查询
SELECT
tableA.field1,
SUM(tableB.field4) AS the_sum
FROM
tableA
LEFT JOIN tableB ON tableA.field1 = tableB.field2
WHERE
/* IN() for multiple possible vals. Use = if only 1 val needed
and then the GROUP BY is unnecessary */
tableA.field1 IN ('val1','val2',val3')
GROUP BY tableA.field1
如何在休眠中实现以下查询?而且我还需要将值作为相应表的对象返回。是否可以?