[JIRA] (HHH-15645) UnknownTableReferenceExceptions since 6.1.1
by Thomas Heigl (JIRA)
Thomas Heigl ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *updated* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiZTExNjEwNzMz... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-15645?atlOrigin=eyJpIjoiZTExNj... ) HHH-15645 ( https://hibernate.atlassian.net/browse/HHH-15645?atlOrigin=eyJpIjoiZTExNj... ) UnknownTableReferenceExceptions since 6.1.1 ( https://hibernate.atlassian.net/browse/HHH-15645?atlOrigin=eyJpIjoiZTExNj... )
Change By: Thomas Heigl ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... )
We are getting UnknownTableReferenceExceptions for various queries after upgrading from 6.1. 4 0 to 6.1. 5 1. E.g:
{noformat}Caused by: org.hibernate.sql.ast.tree.from.UnknownTableReferenceException: Unable to determine TableReference (`user_connection`) for `com.my.project.UserConnection(373713700146208).owner`
at org.hibernate.sql.ast.tree.from.LazyTableGroup.resolveTableReference(LazyTableGroup.java:256)
at org.hibernate.query.sqm.sql.internal.EntityValuedPathInterpretation.from(EntityValuedPathInterpretation.java:318)
at org.hibernate.query.sqm.sql.internal.EntityValuedPathInterpretation.from(EntityValuedPathInterpretation.java:232)
at org.hibernate.query.sqm.sql.internal.EntityValuedPathInterpretation.from(EntityValuedPathInterpretation.java:117)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.lambda$visitEntityValuedPath$57(BaseSqmToSqlAstConverter.java:3820)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.prepareReusablePath(BaseSqmToSqlAstConverter.java:3136)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.prepareReusablePath(BaseSqmToSqlAstConverter.java:3098)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitEntityValuedPath(BaseSqmToSqlAstConverter.java:3820)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitEntityValuedPath(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.domain.SqmEntityValuedSimplePath.accept(SqmEntityValuedSimplePath.java:62)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitComparisonPredicate(BaseSqmToSqlAstConverter.java:6529)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitComparisonPredicate(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.predicate.SqmComparisonPredicate.accept(SqmComparisonPredicate.java:104)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitJunctionPredicate(BaseSqmToSqlAstConverter.java:6333)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitJunctionPredicate(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.predicate.SqmJunctionPredicate.accept(SqmJunctionPredicate.java:74)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitWhereClause(BaseSqmToSqlAstConverter.java:2252)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQuerySpec(BaseSqmToSqlAstConverter.java:1823)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQuerySpec(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.select.SqmQuerySpec.accept(SqmQuerySpec.java:122)
at org.hibernate.query.sqm.spi.BaseSemanticQueryWalker.visitQueryPart(BaseSemanticQueryWalker.java:213)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQueryPart(BaseSqmToSqlAstConverter.java:1679)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitSubQueryExpression(BaseSqmToSqlAstConverter.java:6060)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitSubQueryExpression(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.select.SqmSubQuery.accept(SqmSubQuery.java:641)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitExistsPredicate(BaseSqmToSqlAstConverter.java:6867)
at org.hibernate.query.sqm.tree.predicate.SqmExistsPredicate.accept(SqmExistsPredicate.java:60)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitJunctionPredicate(BaseSqmToSqlAstConverter.java:6333)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitJunctionPredicate(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.predicate.SqmJunctionPredicate.accept(SqmJunctionPredicate.java:74)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitWhereClause(BaseSqmToSqlAstConverter.java:2252)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQuerySpec(BaseSqmToSqlAstConverter.java:1823)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQuerySpec(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.select.SqmQuerySpec.accept(SqmQuerySpec.java:122)
at org.hibernate.query.sqm.spi.BaseSemanticQueryWalker.visitQueryPart(BaseSemanticQueryWalker.java:213)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQueryPart(BaseSqmToSqlAstConverter.java:1679)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitSelectStatement(BaseSqmToSqlAstConverter.java:1477)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitSelectStatement(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.select.SqmSelectStatement.accept(SqmSelectStatement.java:199)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.translate(BaseSqmToSqlAstConverter.java:711)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.buildCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:350)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.withCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:270)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.performList(ConcreteSqmSelectQueryPlan.java:246)
at org.hibernate.query.sqm.internal.QuerySqmImpl.doList(QuerySqmImpl.java:546)
at org.hibernate.query.spi.AbstractSelectionQuery.list(AbstractSelectionQuery.java:363)
at org.hibernate.query.sqm.internal.QuerySqmImpl.list(QuerySqmImpl.java:1032){noformat}
I’ll try to create a reproducer in the coming days.
( https://hibernate.atlassian.net/browse/HHH-15645#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-15645#add-comment?atlOrigin=ey... )
Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.... ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailN... ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209- sha1:d23b292 )
2 years, 2 months