HHH-16155 Disable batching when generated properties are found
This commit is contained in:
parent
c3174e6b62
commit
4cc5941798
|
@ -54,10 +54,16 @@ public class InsertCoordinator extends AbstractMutationCoordinator {
|
|||
public InsertCoordinator(AbstractEntityPersister entityPersister, SessionFactoryImplementor factory) {
|
||||
super( entityPersister, factory );
|
||||
|
||||
if ( entityPersister.hasInsertGeneratedProperties() ) {
|
||||
// disable batching in case of insert generated properties
|
||||
insertBatchKey = null;
|
||||
}
|
||||
else {
|
||||
insertBatchKey = new BasicBatchKey(
|
||||
entityPersister.getEntityName() + "#INSERT",
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
if ( entityPersister.getEntityMetamodel().isDynamicInsert() ) {
|
||||
// the entity specified dynamic-insert - skip generating the
|
||||
|
|
|
@ -89,11 +89,17 @@ public class UpdateCoordinatorStandard extends AbstractMutationCoordinator imple
|
|||
// there are cases where we need the full static updates.
|
||||
this.staticUpdateGroup = buildStaticUpdateGroup();
|
||||
this.versionUpdateGroup = buildVersionUpdateGroup();
|
||||
if ( entityPersister.hasUpdateGeneratedProperties() ) {
|
||||
// disable batching in case of update generated properties
|
||||
this.batchKey = null;
|
||||
}
|
||||
else {
|
||||
this.batchKey = new BasicBatchKey(
|
||||
entityPersister.getEntityName() + "#UPDATE",
|
||||
null
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MutationOperationGroup getStaticUpdateGroup() {
|
||||
|
|
Loading…
Reference in New Issue