HHH-16099 Minor refactoring, extract local constants in UpdateCoordinatorStandard
This commit is contained in:
parent
e00bdc7cb2
commit
9e033c8aea
|
@ -570,7 +570,8 @@ public class UpdateCoordinatorStandard extends AbstractMutationCoordinator imple
|
|||
InclusionChecker dirtinessChecker,
|
||||
boolean forceDynamicUpdate,
|
||||
SharedSessionContractImplementor session) {
|
||||
final AttributeMappingsList attributeMappings = entityPersister().getAttributeMappings();
|
||||
final AbstractEntityPersister persister = entityPersister();
|
||||
final AttributeMappingsList attributeMappings = persister.getAttributeMappings();
|
||||
|
||||
// NOTE:
|
||||
// * `dirtyAttributeIndexes == null` means we had no snapshot and couldn't
|
||||
|
@ -586,6 +587,8 @@ public class UpdateCoordinatorStandard extends AbstractMutationCoordinator imple
|
|||
forceDynamicUpdate
|
||||
);
|
||||
|
||||
final boolean[] propertyUpdateability = persister.getPropertyUpdateability();
|
||||
|
||||
for ( int attributeIndex = 0; attributeIndex < attributeMappings.size(); attributeIndex++ ) {
|
||||
final AttributeMapping attributeMapping = attributeMappings.get( attributeIndex );
|
||||
analysis.startingAttribute( attributeMapping );
|
||||
|
@ -605,8 +608,8 @@ public class UpdateCoordinatorStandard extends AbstractMutationCoordinator imple
|
|||
);
|
||||
|
||||
if ( analysis.currentAttributeAnalysis.isDirty() ) {
|
||||
if ( !entityPersister().getPropertyUpdateability()[attributeIndex] ) {
|
||||
LOG.ignoreImmutablePropertyModification( attributeMapping.getAttributeName(), entityPersister().getEntityName() );
|
||||
if ( !propertyUpdateability[attributeIndex] ) {
|
||||
LOG.ignoreImmutablePropertyModification( attributeMapping.getAttributeName(), persister.getEntityName() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue