我写了以下HQL,
@Query("select fd.fdNumber,fd.depositAmount,fd.period, fd.withdrawalDate, select max(fh.maturityDate) as lastMaturtedDate from FDHistory fh JOIN fh.FixedDeposit fd where fd.status in('WDR','RWD') and fd.withdrawalDate between :start and :end");
我结束了,
Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: expecting CLOSE, found 'null' near line 1, column 261 [select fd.fdNumber,fd.depositAmount,fd.period, fd.withdrawalDate, (selec
at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:91) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:109) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:304) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:203) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:158) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:126) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:88) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:190) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:301) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
我搜索解决方案,但我不能。请帮帮我。