HHH-16839 Failing to update a one-to-one lazy association with and enabled bytecode enhancement
This commit is contained in:
parent
becb11698e
commit
1980da784d
|
@ -1076,6 +1076,7 @@ public class UpdateCoordinatorStandard extends AbstractMutationCoordinator imple
|
|||
|
||||
if ( attributeAnalysis.includeInLocking() ) {
|
||||
final boolean includeRestriction = includeInRestriction(
|
||||
oldValues,
|
||||
dirtinessChecker,
|
||||
versionMapping,
|
||||
versionability,
|
||||
|
@ -1155,6 +1156,7 @@ public class UpdateCoordinatorStandard extends AbstractMutationCoordinator imple
|
|||
}
|
||||
|
||||
private static boolean includeInRestriction(
|
||||
Object[] oldValues,
|
||||
DirtinessChecker dirtinessChecker,
|
||||
EntityVersionMapping versionMapping,
|
||||
boolean[] versionability,
|
||||
|
@ -1162,11 +1164,15 @@ public class UpdateCoordinatorStandard extends AbstractMutationCoordinator imple
|
|||
int attributeIndex,
|
||||
AttributeMapping attributeMapping,
|
||||
AttributeAnalysis attributeAnalysis) {
|
||||
|
||||
if ( optimisticLockStyle == OptimisticLockStyle.VERSION
|
||||
&& versionMapping != null
|
||||
&& attributeMapping == versionMapping.getVersionAttribute() ) {
|
||||
return true;
|
||||
}
|
||||
else if ( oldValues == null ) {
|
||||
return false;
|
||||
}
|
||||
else if ( optimisticLockStyle == OptimisticLockStyle.ALL ) {
|
||||
return versionability[attributeIndex];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue