|
So at least current 5.0.2 does bail out about an unknown order token - however for H2 its ok to bail, but using MySQL/MariaDB the order by sql syntax is correct and should not bail in this case but parse it to a valid sql command.
INFO: HHH000397: Using ASTQueryTranslatorFactory
28.10.2015 13:29:22 org.hibernate.hql.internal.ast.ErrorCounter reportError
ERROR: line 1:61: unexpected token: order
28.10.2015 13:29:22 org.hibernate.hql.internal.ast.ErrorCounter reportError
ERROR: line 1:61: unexpected token: order
line 1:61: unexpected token: order
at org.hibernate.hql.internal.antlr.HqlBaseParser.deleteStatement(HqlBaseParser.java:303)
at org.hibernate.hql.internal.antlr.HqlBaseParser.statement(HqlBaseParser.java:175)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:279)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:187)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142)
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115)
at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:76)
at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:150)
at org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:298)
at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:236)
at org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1825)
So to me 5.0.2 is still affected - it's good that it does not ignore it anymore if it cannot parse the hql and is complaining - but the hql delete is stil not working for e.g. MySQL/MariaDB where its valid to have an order by clause in the delete statement.
|