ObjectDB ObjectDB

Issue #2666: Unexpected query token - AS

Type: Bug ReoprtVersion: 2.8.5_04Priority: HighStatus: FixedReplies: 2

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)



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

The patch solves the issue.

Thank you very much.



To post on this website please sign in.