[JIRA] (HHH-16080) UnknownTableReferenceException with JPQL query of Entity with unidirectional OneToOne mapping
by Mike Conner (JIRA)
Mike Conner ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=62fe3d3... ) *updated* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMjY2NTc1ZGQ3... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-16080?atlOrigin=eyJpIjoiMjY2NT... ) HHH-16080 ( https://hibernate.atlassian.net/browse/HHH-16080?atlOrigin=eyJpIjoiMjY2NT... ) UnknownTableReferenceException with JPQL query of Entity with unidirectional OneToOne mapping ( https://hibernate.atlassian.net/browse/HHH-16080?atlOrigin=eyJpIjoiMjY2NT... )
Change By: Mike Conner ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=62fe3d3... )
We are upgrading to Hibernate 6.x. When querying for an entity with a left join on an OneToOne, where the query criteria includes include the joined entity (if it exists), we get the exception below. I posted [this |https://discourse.hibernate.org/t/unknowntablereferenceexception-unable-to-determine-tablereference/7177]in the forums, and [dreab8|https://discourse.hibernate.org/u/dreab8] requested that I create a ticket. A test Case is attached.
{noformat}jakarta.persistence.PersistenceException: Converting `org.hibernate.sql.ast.tree.from.UnknownTableReferenceException` to JPA `PersistenceException` : Unable to determine TableReference (`Thing`) for `org.hibernate.bugs.entities.Thing(thing).thingStats(thingStats)`
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:165)
at org.hibernate.query.spi.AbstractSelectionQuery.list(AbstractSelectionQuery.java:374)
at org.hibernate.query.sqm.internal.QuerySqmImpl.list(QuerySqmImpl.java:1073)
at org.hibernate.query.Query.getResultList(Query.java:94)
at org.hibernate.bugs.ThingTest.testThingStats(ThingTest.java:77)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: org.hibernate.sql.ast.tree.from.UnknownTableReferenceException: Unable to determine TableReference (`Thing`) for `org.hibernate.bugs.entities.Thing(thing).thingStats(thingStats)`
at org.hibernate.sql.ast.tree.from.LazyTableGroup.resolveTableReference(LazyTableGroup.java:256)
at org.hibernate.query.sqm.sql.internal.EntityValuedPathInterpretation.from(EntityValuedPathInterpretation.java:325)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitTableGroup(BaseSqmToSqlAstConverter.java:3613)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQualifiedAttributeJoin(BaseSqmToSqlAstConverter.java:3416)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQualifiedAttributeJoin(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.domain.AbstractSqmAttributeJoin.accept(AbstractSqmAttributeJoin.java:131)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitWithInferredType(BaseSqmToSqlAstConverter.java:6180)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitIsNullPredicate(BaseSqmToSqlAstConverter.java:6681)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitIsNullPredicate(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.predicate.SqmNullnessPredicate.accept(SqmNullnessPredicate.java:53)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitJunctionPredicate(BaseSqmToSqlAstConverter.java:6344)
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:213)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.translate(BaseSqmToSqlAstConverter.java:711)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.buildCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:380)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.withCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:300)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.performList(ConcreteSqmSelectQueryPlan.java:276)
at org.hibernate.query.sqm.internal.QuerySqmImpl.doList(QuerySqmImpl.java:571)
at org.hibernate.query.spi.AbstractSelectionQuery.list(AbstractSelectionQuery.java:363)
... 32 more
{noformat}
( https://hibernate.atlassian.net/browse/HHH-16080#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-16080#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#100214- sha1:02c55de )
1 year, 8 months
[JIRA] (HHH-16080) UnknownTableReferenceException with JPQL query of Entity with unidirectional OneToOne mapping
by Mike Conner (JIRA)
Mike Conner ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=62fe3d3... ) *created* an issue
Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiYTk1NmE0Zjg3... ) / Bug ( https://hibernate.atlassian.net/browse/HHH-16080?atlOrigin=eyJpIjoiYTk1Nm... ) HHH-16080 ( https://hibernate.atlassian.net/browse/HHH-16080?atlOrigin=eyJpIjoiYTk1Nm... ) UnknownTableReferenceException with JPQL query of Entity with unidirectional OneToOne mapping ( https://hibernate.atlassian.net/browse/HHH-16080?atlOrigin=eyJpIjoiYTk1Nm... )
Issue Type: Bug Affects Versions: 6.1.6 Assignee: Unassigned Components: query-hql Created: 23/Jan/2023 07:50 AM Environment: hibernate version:
6.1.6
$ java -version
openjdk version "17.0.4" 2022-07-19 LTS
OpenJDK Runtime Environment Corretto-17.0.4.8.1 (build 17.0.4+8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.4.8.1 (build 17.0.4+8-LTS, mixed mode, sharing)
OS:
Edition Windows 10 Enterprise
Version 20H2
Installed on 8/23/2021
OS build 19042.2364
Experience Windows Feature Experience Pack 120.2212.4190.0
DB: SELECT version FROM V$INSTANCE:
19.0.0.0.0 Priority: Major Reporter: Mike Conner ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=62fe3d3... )
We are upgrading to Hibernate 6.x. When querying for an entity with a left join on an OneToOne, where the query criteria includes the joined entity (if it exists), we get the exception below. I posted this ( https://discourse.hibernate.org/t/unknowntablereferenceexception-unable-t... ) in the forums, and dreab8 ( https://discourse.hibernate.org/u/dreab8 ) requested that I create a ticket.
jakarta.persistence.PersistenceException: Converting `org.hibernate.sql.ast.tree.from.UnknownTableReferenceException` to JPA `PersistenceException` : Unable to determine TableReference (`Thing`) for `org.hibernate.bugs.entities.Thing(thing).thingStats(thingStats)`
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:165)
at org.hibernate.query.spi.AbstractSelectionQuery.list(AbstractSelectionQuery.java:374)
at org.hibernate.query.sqm.internal.QuerySqmImpl.list(QuerySqmImpl.java:1073)
at org.hibernate.query.Query.getResultList(Query.java:94)
at org.hibernate.bugs.ThingTest.testThingStats(ThingTest.java:77)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: org.hibernate.sql.ast.tree.from.UnknownTableReferenceException: Unable to determine TableReference (`Thing`) for `org.hibernate.bugs.entities.Thing(thing).thingStats(thingStats)`
at org.hibernate.sql.ast.tree.from.LazyTableGroup.resolveTableReference(LazyTableGroup.java:256)
at org.hibernate.query.sqm.sql.internal.EntityValuedPathInterpretation.from(EntityValuedPathInterpretation.java:325)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitTableGroup(BaseSqmToSqlAstConverter.java:3613)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQualifiedAttributeJoin(BaseSqmToSqlAstConverter.java:3416)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitQualifiedAttributeJoin(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.domain.AbstractSqmAttributeJoin.accept(AbstractSqmAttributeJoin.java:131)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitWithInferredType(BaseSqmToSqlAstConverter.java:6180)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitIsNullPredicate(BaseSqmToSqlAstConverter.java:6681)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitIsNullPredicate(BaseSqmToSqlAstConverter.java:416)
at org.hibernate.query.sqm.tree.predicate.SqmNullnessPredicate.accept(SqmNullnessPredicate.java:53)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitJunctionPredicate(BaseSqmToSqlAstConverter.java:6344)
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:213)
at org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.translate(BaseSqmToSqlAstConverter.java:711)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.buildCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:380)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.withCacheableSqmInterpretation(ConcreteSqmSelectQueryPlan.java:300)
at org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan.performList(ConcreteSqmSelectQueryPlan.java:276)
at org.hibernate.query.sqm.internal.QuerySqmImpl.doList(QuerySqmImpl.java:571)
at org.hibernate.query.spi.AbstractSelectionQuery.list(AbstractSelectionQuery.java:363)
... 32 more
( https://hibernate.atlassian.net/browse/HHH-16080#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-16080#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#100214- sha1:02c55de )
1 year, 8 months
[JIRA] (HHH-15856) Secondary super-type cache contention mitigations (continued).
by Jeremy Whiting (JIRA)
Jeremy Whiting ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%... ) *commented* on HHH-15856 ( https://hibernate.atlassian.net/browse/HHH-15856?atlOrigin=eyJpIjoiNGIzMG... )
Re: Secondary super-type cache contention mitigations (continued). ( https://hibernate.atlassian.net/browse/HHH-15856?atlOrigin=eyJpIjoiNGIzMG... )
Using the type pollution agent tool the following is a fragment from the report.
------------------------------------------------------------
1: org.hibernate.persister.entity.SingleTableEntityPersister
------------------------------------------------------------
Count: 183959974
Types:
org.hibernate.persister.entity.EntityPersister
org.hibernate.metamodel.mapping.EntityMappingType
org.hibernate.persister.entity.Loadable
org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer
org.hibernate.persister.entity.UniqueKeyLoadable
org.hibernate.metamodel.mapping.internal.InFlightEntityMappingType
org.hibernate.persister.entity.Joinable
org.hibernate.metamodel.mapping.Restrictable
org.hibernate.persister.entity.Queryable
org.hibernate.persister.entity.PropertyMapping
org.hibernate.metamodel.mapping.EntityValuedModelPart
org.hibernate.metamodel.mapping.ModelPartContainer
Traces:
org.hibernate.sql.results.graph.entity.AbstractEntityInitializer.<init>(AbstractEntityInitializer.java:199)
class: org.hibernate.metamodel.mapping.EntityMappingType
count: 71378712
org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl.getEntityDescriptor(MappingMetamodelImpl.java:414)
class: org.hibernate.persister.entity.EntityPersister
count: 46099450
org.hibernate.sql.results.jdbc.internal.JdbcValuesSourceProcessingStateStandardImpl.lambda$postLoad$0(JdbcValuesSourceProcessingStateStandardImpl.java:218)
class: org.hibernate.persister.entity.Loadable
count: 20745931
org.hibernate.sql.results.graph.entity.AbstractEntityInitializer.<init>(AbstractEntityInitializer.java:120)
class: org.hibernate.persister.entity.EntityPersister
count: 17322845
org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl.getEntityDescriptor(MappingMetamodelImpl.java:457)
class: org.hibernate.persister.entity.EntityPersister
count: 12592327
org.hibernate.bytecode.enhance.spi.interceptor.LazyAttributeLoadingInterceptor.lambda$loadAttribute$0(LazyAttributeLoadingInterceptor.java:111)
class: org.hibernate.bytecode.enhance.spi.LazyPropertyInitializer
count: 5096164
org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl.findEntityDescriptor(MappingMetamodelImpl.java:437)
class: org.hibernate.persister.entity.EntityPersister
count: 3657837
org.hibernate.sql.results.graph.Initializer.isAttributeAssignableToConcreteDescriptor(Initializer.java:84)
class: org.hibernate.persister.entity.EntityPersister
count: 3548875
org.hibernate.engine.internal.AbstractEntityEntry.overwriteLoadedStateCollectionValue(AbstractEntityEntry.java:321)
class: org.hibernate.persister.entity.UniqueKeyLoadable
count: 1963743
org.hibernate.sql.results.graph.entity.AbstractEntityInitializer.<init>(AbstractEntityInitializer.java:176)
class: org.hibernate.metamodel.mapping.EntityMappingType
count: 1245029
org.hibernate.sql.results.graph.entity.AbstractEntityInitializer.<init>(AbstractEntityInitializer.java:201)
class: org.hibernate.metamodel.mapping.EntityMappingType
count: 308768
org.hibernate.sql.results.graph.FetchParent.resolveNavigablePath(FetchParent.java:51)
class: org.hibernate.metamodel.mapping.EntityMappingType
count: 61
org.hibernate.loader.ast.internal.LoaderSelectBuilder.generateSelect(LoaderSelectBuilder.java:482)
class: org.hibernate.metamodel.mapping.Restrictable
count: 21
org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.execute(MappingModelCreationProcess.java:85)
class: org.hibernate.metamodel.mapping.internal.InFlightEntityMappingType
count: 19
org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.execute(MappingModelCreationProcess.java:76)
class: org.hibernate.persister.entity.EntityPersister
count: 18
org.hibernate.type.EntityType.getAssociatedJoinable(EntityType.java:196)
class: org.hibernate.persister.entity.Joinable
count: 18
org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.execute(MappingModelCreationProcess.java:77)
class: org.hibernate.metamodel.mapping.internal.InFlightEntityMappingType
count: 18
org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.getEntityPersister(MappingModelCreationProcess.java:65)
class: org.hibernate.persister.entity.EntityPersister
count: 17
org.hibernate.loader.ast.internal.SingleIdEntityLoaderStandardImpl.createLoadPlan(SingleIdEntityLoaderStandardImpl.java:194)
class: org.hibernate.persister.entity.Loadable
count: 17
org.hibernate.metamodel.model.domain.internal.EntityTypeImpl.<init>(EntityTypeImpl.java:68)
class: org.hibernate.persister.entity.Queryable
count: 13
org.hibernate.metamodel.model.domain.internal.MappingMetamodelImpl.finishInitialization(MappingMetamodelImpl.java:235)
class: org.hibernate.persister.entity.EntityPersister
count: 12
org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.execute(MappingModelCreationProcess.java:82)
class: org.hibernate.persister.entity.EntityPersister
count: 11
org.hibernate.persister.collection.AbstractCollectionPersister.applyWhereRestrictions(AbstractCollectionPersister.java:1805)
class: org.hibernate.persister.entity.Joinable
count: 11
org.hibernate.metamodel.mapping.internal.FetchOptionsHelper.determineFetchStyleByMetadata(FetchOptionsHelper.java:52)
class: org.hibernate.persister.entity.EntityPersister
count: 9
org.hibernate.metamodel.mapping.internal.FetchOptionsHelper.isSubsequentSelectDelayed(FetchOptionsHelper.java:124)
class: org.hibernate.persister.entity.EntityPersister
count: 9
org.hibernate.persister.collection.OneToManyPersister.getTableName(OneToManyPersister.java:496)
class: org.hibernate.persister.entity.Joinable
count: 8
org.hibernate.query.sqm.sql.BaseSqmToSqlAstConverter.visitTableGroup(BaseSqmToSqlAstConverter.java:3479)
class: org.hibernate.metamodel.mapping.EntityValuedModelPart
count: 6
org.hibernate.metamodel.mapping.internal.MappingModelCreationHelper.interpretPluralAttributeMappingKeyDescriptor(MappingModelCreationHelper.java:779)
class: org.hibernate.metamodel.mapping.ModelPartContainer
count: 5
org.hibernate.metamodel.mapping.internal.EntityCollectionPart.<init>(EntityCollectionPart.java:185)
class: org.hibernate.persister.entity.PropertyMapping
count: 4
org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:92)
class: org.hibernate.persister.entity.EntityPersister
count: 4
org.hibernate.persister.collection.AbstractCollectionPersister.applyWhereRestrictions(AbstractCollectionPersister.java:1806)
class: org.hibernate.persister.entity.Joinable
count: 3
org.hibernate.persister.collection.AbstractCollectionPersister.<init>(AbstractCollectionPersister.java:620)
class: org.hibernate.persister.entity.PropertyMapping
count: 3
org.hibernate.persister.entity.AbstractEntityPersister.visitSubTypeAttributeMappings(AbstractEntityPersister.java:6843)
class: org.hibernate.metamodel.mapping.EntityMappingType
count: 1
org.hibernate.metamodel.mapping.internal.MappingModelCreationProcess.execute(MappingModelCreationProcess.java:78)
class: org.hibernate.metamodel.mapping.internal.InFlightEntityMappingType
count: 1
org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping.getReferencedNavigablePath(ToOneAttributeMapping.java:1166)
class: org.hibernate.metamodel.mapping.EntityMappingType
count: 1
org.hibernate.persister.entity.AbstractEntityPersister.linkWithSuperType(AbstractEntityPersister.java:6086)
class: org.hibernate.metamodel.mapping.internal.InFlightEntityMappingType
count: 1
org.hibernate.persister.entity.AbstractEntityPersister.getStateArrayInitialPosition(AbstractEntityPersister.java:5990)
class: org.hibernate.metamodel.mapping.internal.InFlightEntityMappingType
count: 1
org.hibernate.sql.results.graph.FetchParent.resolveNavigablePath(FetchParent.java:52)
class: org.hibernate.metamodel.mapping.EntityMappingType
count: 1
It revels the type SingleTableEntityPersister is being type cast. The types listed with it’s ocurance.
The purpose of a PR is to remove the explicit type casts or instanceof checks. Thus avoiding writing to a contended field.
By adding a default at the ancestor instance that returns a reference of the desired type the cast can be avoided.
( https://hibernate.atlassian.net/browse/HHH-15856#add-comment?atlOrigin=ey... ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-15856#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#100214- sha1:02c55de )
1 year, 8 months