-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Query parsing error in 4.3.x but works ok in 4.2.x
PostPosted: Thu Apr 03, 2014 4:35 am 
Newbie

Joined: Thu Apr 03, 2014 4:20 am
Posts: 1
Hi,

recently I ran into an issue with a query that works fine on hibernate 4.2.x (4.2.0.SP1) but fails in 4.3.x (, here is the query:
Code:
select key.processInstanceId from org.jbpm.persistence.correlation.CorrelationKeyInfo key left join key.properties props where size(key.properties) = cast(:elem_count as integer) and props.value in :properties group by key.id,key.processInstanceId having count(key.id) = :elem_count


and the error reported is:
Code:
[QC] DEBUG [localhost-startStop-1] org.hibernate.internal.NamedQueryRepository.checkNamedQueries(159) | Checking named query: GetProcessInstanceIdByCorrelation

[QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(294) | parse() - HQL: select key.processInstanceId from org.jbpm.persistence.correlation.CorrelationKeyInfo key left join key.properties props where size(key.properties) = cast(:elem_count as integer) and props.value in :properties group by key.id,key.processInstanceId having count(key.id) = :elem_count
[QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.reportWarning(89) | Keyword  'properties' is being interpreted as an identifier due to: expecting IDENT, found 'properties'
[QC] ERROR [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.reportError(78) | line 1:133: unexpected token: key
[QC] ERROR [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.reportError(73) | line 1:133: unexpected token: key
line 1:133: unexpected token: key
....

[QC] ERROR [localhost-startStop-1] org.hibernate.internal.SessionFactoryImpl.<init>(541) | HHH000177: Error in named query: GetProcessInstanceIdByCorrelation

org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: key near line 1, column 133 [select key.processInstanceId from org.jbpm.persistence.correlation.CorrelationKeyInfo key left join key.properties props where size(key.properties) = cast(:elem_count as integer) and props.value in :properties group by key.id,key.processInstanceId having count(key.id) = :elem_count]


could it be because use of the "properties" in both field name and then parameter?

Thanks in advance for any hints
Maciej


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.