protected function toIdentityMap(EntityInterface $entity) { $this->getIdentityMap()->offsetSet($entity->getId(), $entity); $this->identityMapOriginal->offsetSet($entity->getId(), clone $entity); }