This commit is contained in:
parent
ec4dd4ab44
commit
800215040a
1 changed files with 6 additions and 8 deletions
|
@ -3468,16 +3468,14 @@ class UnitOfWork implements PropertyChangedListener
|
|||
*/
|
||||
private function clearIdentityMapForEntityName($entityName)
|
||||
{
|
||||
$visited = array();
|
||||
if (! isset($this->identityMap[$entityName])) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($this->identityMap as $className => $entities) {
|
||||
if ($className !== $entityName) {
|
||||
continue;
|
||||
}
|
||||
$visited = [];
|
||||
|
||||
foreach ($entities as $entity) {
|
||||
$this->doDetach($entity, $visited, false);
|
||||
}
|
||||
foreach ($this->identityMap[$entityName] as $entity) {
|
||||
$this->doDetach($entity, $visited, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue