|
@@ 525-527 (lines=3) @@
|
| 522 |
|
} |
| 523 |
|
|
| 524 |
|
// Check identity map first, if its already in there just return it. |
| 525 |
|
if (($entity = $this->unitOfWork->tryGetById($sortedId, $class->getRootClassName())) !== false) { |
| 526 |
|
return ($entity instanceof $className) ? $entity : null; |
| 527 |
|
} |
| 528 |
|
|
| 529 |
|
if ($class->getSubClasses()) { |
| 530 |
|
return $this->find($entityName, $sortedId); |
|
@@ 586-588 (lines=3) @@
|
| 583 |
|
} |
| 584 |
|
|
| 585 |
|
// Check identity map first, if its already in there just return it. |
| 586 |
|
if (($entity = $this->unitOfWork->tryGetById($sortedId, $class->getRootClassName())) !== false) { |
| 587 |
|
return ($entity instanceof $className) ? $entity : null; |
| 588 |
|
} |
| 589 |
|
|
| 590 |
|
$persister = $this->unitOfWork->getEntityPersister($class->getClassName()); |
| 591 |
|
$entity = $this->unitOfWork->newInstance($class); |