[JIRA] (HHH-16540) UnknownTableReferenceException for entity with Embeddable key-value in map
by Debbie Philip (JIRA)
Debbie Philip ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%... ) *created* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNTUyNjZhNWU5... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-16540?atlOrigin=eyJpIjoiNTUyNj... ) HHH-16540 ( https://hibernate.atlassian.net/browse/HHH-16540?atlOrigin=eyJpIjoiNTUyNj... ) UnknownTableReferenceException for entity with Embeddable key-value in map ( https://hibernate.atlassian.net/browse/HHH-16540?atlOrigin=eyJpIjoiNTUyNj... )
Issue Type: Bug Affects Versions: 6.2.2 Assignee: Unassigned Created: 02/May/2023 06:16 AM Priority: Major Reporter: Debbie Philip ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%... )
UnknownTableReferenceException thrown while running a query on an entity with a map containing Embeddables as its key-value pairs.
org.hibernate.sql.ast.tree.from.UnknownTableReferenceException: Unable to determine TableReference (`TestEntity_images_scaledImages`) for `entities.TestEntity(64947455612188).images(64947456839728).{element}`
at org.hibernate.sql.ast.tree.from.ColumnReferenceQualifier.resolveTableReference(ColumnReferenceQualifier.java:74)
at org.hibernate.metamodel.mapping.internal.EmbeddedCollectionPart.lambda$toSqlExpression$1(EmbeddedCollectionPart.java:208)
at org.hibernate.metamodel.mapping.internal.SelectableMappingsImpl.forEachSelectable(SelectableMappingsImpl.java:159)
at org.hibernate.metamodel.mapping.internal.AbstractEmbeddableMapping.forEachSelectable(AbstractEmbeddableMapping.java:518)
at org.hibernate.metamodel.mapping.internal.EmbeddedCollectionPart.toSqlExpression(EmbeddedCollectionPart.java:205)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitTableGroup(BaseSqmToSqlAstConverter.java:3874)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQualifiedAttributeJoin(BaseSqmToSqlAstConverter.java:3640)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQualifiedAttributeJoin(BaseSqmToSqlAstConverter.java:429)
at org.hibernate.query.sqm.SemanticQueryWalker.visitMapJoin(SemanticQueryWalker.java:206)
at org.hibernate.query.sqm.tree.domain.SqmMapJoin.accept(SqmMapJoin.java:89)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitSelection(BaseSqmToSqlAstConverter.java:2219)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitSelectClause(BaseSqmToSqlAstConverter.java:2161)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQuerySpec(BaseSqmToSqlAstConverter.java:2029)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQuerySpec(BaseSqmToSqlAstConverter.java:429)
at org.hibernate.query.sqm.tree.select.SqmQuerySpec.accept(SqmQuerySpec.java:122)
at org.hibernate.query.sqm.spi.BaseSemanticQueryWalker.visitQueryPart(BaseSemanticQueryWalker.java:221)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQueryPart(BaseSqmToSqlAstConverter.java:1889)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitSelectStatement(BaseSqmToSqlAstConverter.java:1574)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitSelectStatement(BaseSqmToSqlAstConverter.java:429)
at org.hibernate.query.sqm.tree.select.SqmSelectStatement.accept(SqmSelectStatement.java:222)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.translate(BaseSqmToSqlAstConverter.java:767)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.buildCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:344)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.withCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:267)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.performList(ConcreteSqmSelectQueryPlan.java:243)
at org.hibernate.query.sqm.internal.QuerySqmImpl.doList(QuerySqmImpl.java:518)
at org.hibernate.query.spi.AbstractSelectionQuery.list(AbstractSelectionQuery.java:367)
at org.hibernate.query.spi.AbstractSelectionQuery.getSingleResult(AbstractSelectionQuery.java:473)
at org.hibernate.test.HibernateBugTest.handleQueryResult(HibernateBugTest.java:62)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
( https://hibernate.atlassian.net/browse/HHH-16540#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-16540#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#100224- sha1:07bd2b7 )
1 year, 8 months