Hql查询:
Select ecd.consumption from com.dventus.wonchi.jaxb.messages.Wonchi as w
join w.systemBound as consumption
join consumption.fixedNetwork as ecd
where w.meterId = 'DVEHighLowUsageCheck' and ecd.time in (select min(ecd.time))
例外:
java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected end of subtree [Select ecd.consumption from com.dventus.wonchi.jaxb.messages.Wonchi as w join w.systemBound as consumption join consumption.fixedNetwork as ecd where w.meterId = 'DVEHighLowUsageCheck' and ecd.time in (select min(ecd.time))]
答案 0 :(得分:0)
正如@getjackx所指出的,语法不正确。
您需要为子选择FROM
添加条款select min(ecd.time)
,例如:
select min(ecd2.time) FROM FixedNetwork ec2