This commit is contained in:
parent
14e0800293
commit
20d86c5b27
1 changed files with 6 additions and 8 deletions
|
@ -3460,16 +3460,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