org.hibernate.hql.internal.ast.QuerySyntaxException: Invalid path: 'generatedAlias2.name' [select generatedAlias0 from org.hibernate.bugs.entity.Allocation as generatedAlias0 inner join generatedAlias0.resource as generatedAlias1 where generatedAlias2.name=:param0]

Hibernate JIRA | Tony Cramer | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Accessing property of associated subclass causes an error. Testcase included. Bug does not occur in 5.1.0 and 5.2.0 versions. 5.1.0 ok 5.1.1 fail 5.2.0 ok 5.2.1 fail 5.2.2 fail org.hibernate.hql.internal.ast.QuerySyntaxException: Invalid path: 'generatedAlias2.name' [select generatedAlias0 from org.hibernate.bugs.entity.Allocation as generatedAlias0 inner join generatedAlias0.resource as generatedAlias1 where generatedAlias2.name=:param0] at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:74) at org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:91) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:268) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:190) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:77) at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:152) at org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:526) at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:628)

    Hibernate JIRA | 7 months ago | Tony Cramer
    org.hibernate.hql.internal.ast.QuerySyntaxException: Invalid path: 'generatedAlias2.name' [select generatedAlias0 from org.hibernate.bugs.entity.Allocation as generatedAlias0 inner join generatedAlias0.resource as generatedAlias1 where generatedAlias2.name=:param0]

  1. Shadd518 7 times, last 7 months ago

Root Cause Analysis

  1. org.hibernate.hql.internal.ast.QuerySyntaxException

    Invalid path: 'generatedAlias2.name' [select generatedAlias0 from org.hibernate.bugs.entity.Allocation as generatedAlias0 inner join generatedAlias0.resource as generatedAlias1 where generatedAlias2.name=:param0]

    at org.hibernate.hql.internal.ast.QuerySyntaxException.convert()
  2. Hibernate
    AbstractSharedSessionContract.createQuery
    1. org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:74)
    2. org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:91)
    3. org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:268)
    4. org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:190)
    5. org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142)
    6. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115)
    7. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
    8. org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:152)
    9. org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:526)
    10. org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:628)
    10 frames