[DDC-3160] Change to fix that was implemented for DDC-2996.
A fix for DDC-2996 was implemented that broke quite a few extensions. This commit is an attempt to fix the DDC-2996 bug without the adverse side effects seen in DDC-3160. Basically, if changes are detected that would cause a changeset to be made, but the entity is awaiting insertion, the code will not save the changeset nor flag the entity as awaiting updating in the Unit of Work. Some styling tweaks based on Pull Request guidelines.
This commit is contained in:
parent
a5cf6417b3
commit
65e7cc9143
@ -943,13 +943,14 @@ class UnitOfWork implements PropertyChangedListener
|
||||
}
|
||||
|
||||
if ($changeSet) {
|
||||
$this->entityChangeSets[$oid] = (isset($this->entityChangeSets[$oid]))
|
||||
? array_merge($this->entityChangeSets[$oid], $changeSet)
|
||||
: $changeSet;
|
||||
|
||||
$this->originalEntityData[$oid] = $actualData;
|
||||
if (isset($this->entityChangeSets[$oid])) {
|
||||
$this->entityChangeSets[$oid] = array_merge($this->entityChangeSets[$oid], $changeSet);
|
||||
} else if ( ! isset($this->entityInsertions[$oid])) {
|
||||
$this->entityChangeSets[$oid] = $changeSet;
|
||||
$this->entityUpdates[$oid] = $entity;
|
||||
}
|
||||
$this->originalEntityData[$oid] = $actualData;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user