Issue #2666: Unexpected query token - AS

Type: BugVersion: 2.8.5_04Priority: HighStatus: FixedReplies: 2
#1

We have an issue with following query:

SELECT DISTINCT instance, instanceEntryArtifactSet, artifact
FROM     com.btc.ep.engine.bl.internal.dmos.EngineInstanceImpl AS instance    
JOIN instance.artifacts AS instanceEntryArtifactSet ,     com.btc.ep.engine.bl.internal.dmos.ArtifactImpl AS artifact    
LEFT JOIN artifact.activatedGoals AS artifactActivatedGoals    
LEFT JOIN artifact.activatedAssumptions AS artifactActivatedAssumptions    
LEFT JOIN artifact.activatedCalibrations AS artifactActivatedCalibrations
WHERE        (    artifactActivatedGoals MEMBER OF ?1          
OR artifactActivatedAssumptions MEMBER OF ?1          
OR artifactActivatedCalibrations MEMBER OF ?1        )   
AND artifact MEMBER OF instanceEntryArtifactSet.artifacts

 

Caused by: com.objectdb.o.UserException: Unexpected query token 'instance.artifacts AS instanceEntryArtifactSet'
    at com.objectdb.o.MSG.a(MSG.java:64)
    at com.objectdb.o.QPR.g(QPR.java:570)
    at com.objectdb.o.QPR.r(QPR.java:445)
    at com.objectdb.o.QPR.d(QPR.java:148)
    at com.objectdb.o.QRC.<init>(QRC.java:132)
    at com.objectdb.o.QRM.Zs(QRM.java:272)
    at com.objectdb.o.MST.Zs(MST.java:1019)
    at com.objectdb.o.WRA.Zs(WRA.java:313)
    at com.objectdb.o.WSM.Zs(WSM.java:117)
    at com.objectdb.o.QRR.k(QRR.java:260)
    at com.objectdb.o.QRR.i(QRR.java:154)
    at com.objectdb.jpa.JpaQuery.getResultList(JpaQuery.java:726)

 

#2

Thank you for this report. It seems as a regression bug in version 2.8.5 due to fixing another issue with using AS in queries. Please try build 2.8.5_05, which hopefully should solve this issue.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
#3

The patch solves the issue.

Thank you very much.


Post Reply

To post a reply and/or subscribe to update notifications - please login