Query Parser removes Whitespaces from HQL after Upgrade to 6.1.x

Hi!

I am currently upgrading an application to hibernate 6.1.x, coming from 5.x.

Everything compiles and runs nicely, except I cannot execute HQL queries. When parsing a query all whitespaces seem to get discarded and the resulting string cannot be processed.

Any ideas on what might be going on?

Cheers
Chris

org.hibernate.query.SemanticException: A query exception occurred [SELECT ch FROM Chart ch WHERE ch.series = :series AND ch.defaultChart = :true]
	at org.hibernate.query.hql.internal.StandardHqlTranslator.parseHql(StandardHqlTranslator.java:130)
	at org.hibernate.query.hql.internal.StandardHqlTranslator.translate(StandardHqlTranslator.java:77)
	at org.hibernate.internal.AbstractSharedSessionContract.lambda$createQuery$2(AbstractSharedSessionContract.java:747)
	at org.hibernate.query.internal.QueryInterpretationCacheStandardImpl.createHqlInterpretation(QueryInterpretationCacheStandardImpl.java:141)
	at org.hibernate.query.internal.QueryInterpretationCacheStandardImpl.resolveHqlInterpretation(QueryInterpretationCacheStandardImpl.java:128)
	at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:744)
	... 50 more
Caused by: org.hibernate.query.sqm.ParsingException: line 1:63 no viable alternative at input 'SELECTchFROMfromChartchWHEREch.series=:seriesANDch.defaultChart=:true'
	at org.hibernate.query.hql.internal.StandardHqlTranslator$1.syntaxError(StandardHqlTranslator.java:46)
	at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41)
	at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:543)
	at org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:310)
	at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:136)
	at org.hibernate.grammars.hql.HqlParser.queryExpression(HqlParser.java:1180)
	at org.hibernate.grammars.hql.HqlParser.selectStatement(HqlParser.java:382)
	at org.hibernate.grammars.hql.HqlParser.statement(HqlParser.java:313)
	at org.hibernate.query.hql.internal.StandardHqlTranslator.parseHql(StandardHqlTranslator.java:116)
	... 55 more

I solved it: query parameters must not be named :true anymore. It worked fine in older versions, but needs different names now.