org.hibernate.query.sqm.InterpretationException occurs when the query uses embeddedId in the subquery section with a relation between the outer and the inner query Code Sample:
Exception: org.hibernate.query.sqm.InterpretationException: Error interpreting query [SELECT COUNT(*) FROM QueryEntity u1, Visualization u2 WHERE u1.id IN (SELECT id.queryId from QueryUser WHERE id.queryId = u2.queryId AND id.userId=?1)]; this may indicate a semantic (user query) problem or a bug in the parser [SELECT COUNT(*) FROM QueryEntity u1, Visualization u2 WHERE u1.id IN (SELECT id.queryId from QueryUser WHERE id.queryId = u2.queryId AND id.userId=?1)]\n\tat org.hibernate.query.hql.internal.StandardHqlTranslator.translate(StandardHqlTranslator.java:97)\n\tat org.hibernate.internal.AbstractSharedSessionContract.lambda$createQuery$2(AbstractSharedSessionContract.java:747)\n\tat org.hibernate.query.internal.QueryInterpretationCacheStandardImpl.createHqlInterpretation(QueryInterpretationCacheStandardImpl.java:141)\n\tat org.hibernate.query.internal.QueryInterpretationCacheStandardImpl.resolveHqlInterpretation(QueryInterpretationCacheStandardImpl.java:128)\n\tat org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:744)\n\t... 47 common frames omitted\nCaused by: java.lang.IllegalStateException: Multiple from-elements expose unqualified attribute : id\n\tat org.hibernate.query.hql.internal.SqmPathRegistryImpl.findFromExposing(SqmPathRegistryImpl.java:192)\n\tat org.hibernate.query.hql.internal.BasicDotIdentifierConsumer$BaseLocalSequencePart.resolvePathPart(BasicDotIdentifierConsumer.java:146)\n\tat org.hibernate.query.hql.internal.BasicDotIdentifierConsumer.consumeIdentifier More details can be found at https://stackoverflow.com/questions/75151335/error-when-using-query-with-embeddedid-after-upgrading-to-spring-boot-3-0-1 |