diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteInsertStrategy.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteInsertStrategy.java index 79ad2b1cf0..4aac6f4992 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteInsertStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteInsertStrategy.java @@ -154,4 +154,16 @@ public class CteInsertStrategy implements SqmMultiTableInsertStrategy { DomainQueryExecutionContext context) { return new CteInsertHandler( entityCteTable, sqmInsertStatement, domainParameterXref, sessionFactory ).execute( context ); } + + protected EntityPersister getRootDescriptor() { + return rootDescriptor; + } + + protected SessionFactoryImplementor getSessionFactory() { + return sessionFactory; + } + + protected CteTable getEntityCteTable() { + return entityCteTable; + } } diff --git a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteMutationStrategy.java b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteMutationStrategy.java index a1c9c97948..1a31b0f776 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteMutationStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/cte/CteMutationStrategy.java @@ -106,7 +106,7 @@ public class CteMutationStrategy implements SqmMultiTableMutationStrategy { return new CteUpdateHandler( idCteTable, sqmUpdate, domainParameterXref, this, sessionFactory ).execute( context ); } - private void checkMatch(SqmDeleteOrUpdateStatement sqmStatement) { + protected void checkMatch(SqmDeleteOrUpdateStatement sqmStatement) { final String targetEntityName = sqmStatement.getTarget().getEntityName(); final EntityPersister targetEntityDescriptor = sessionFactory.getRuntimeMetamodels() .getMappingMetamodel() @@ -124,4 +124,16 @@ public class CteMutationStrategy implements SqmMultiTableMutationStrategy { } } + + protected EntityPersister getRootDescriptor() { + return rootDescriptor; + } + + protected SessionFactoryImplementor getSessionFactory() { + return sessionFactory; + } + + protected CteTable getIdCteTable() { + return idCteTable; + } }