src/Mapper/Relation/AbstractRelation.php
protected function registerEntity($entity)
    {
        Orm::getRepository($this->getParentEntity())
            ->getIdentityMap()
            ->set($entity);

        return $entity;
    }
protected function registerEntity($entity)
    {
        Orm::getRepository($this->getParentEntity())
            ->getIdentityMap()
            ->set($entity);

        return $entity;
    }
protected function registerEntity ( $ entity ) { Orm :: getRepository ( $ this -> getParentEntity ( ) ) -> getIdentityMap ( ) -> set ( $ entity ) ; return $ entity ; }
Register the retrieved entities in the repository identity map

@param EntityInterface|EntityCollection $entity

@return EntityInterface|EntityCollection
Register the retrieved entities in the repository identity map