Debbie Philip (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=712020%...
) *commented* on HHH-16540 (
https://hibernate.atlassian.net/browse/HHH-16540?atlOrigin=eyJpIjoiMzIxYz...
)
Re: UnknownTableReferenceException for entity with Embeddable key-value in map (
https://hibernate.atlassian.net/browse/HHH-16540?atlOrigin=eyJpIjoiMzIxYz...
)
Issue seems to be in class BaseSqmToSqlAstConverter.java, method visitTableGroup() being
called by method visitQualifiedAttributeJoin()
private Expression visitTableGroup(TableGroup tableGroup, SqmFrom<?, ?> path) {
…
else if (actualModelPart instanceof EmbeddableValuedModelPart) {
EmbeddableValuedModelPart mapping =
(EmbeddableValuedModelPart)actualModelPart;
result = new
EmbeddableValuedPathInterpretation(mapping.toSqlExpression(tableGroup,
(Clause)this.currentClauseStack.getCurrent(), this, this.getSqlAstCreationState()),
navigablePath, mapping, tableGroup);
}
}
mapping.toSqlExpression( *tableGroup* , ..) was changed to
mapping.toSqlExpression(getFromClauseAccess().findTableGroup(
path.getLhs().getNavigablePath() ) in 6.2.2
This causes it to return tableGroup as entities.TestEntity (xxx).images(xxx).
{element} instead of entities.TestEntity (xxx).images(xxx). scaledImages(xxx).{element}
, hence throwing the exception.
(
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=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100224- sha1:07bd2b7 )