Nextras\Orm\Relationships\ManyHasMany::updateRelationshipAdd PHP Метод

updateRelationshipAdd() защищенный Метод

protected updateRelationshipAdd ( Nextras\Orm\Entity\IEntity $entity )
$entity Nextras\Orm\Entity\IEntity
    protected function updateRelationshipAdd(IEntity $entity)
    {
        if (!$this->metadata->relationship->property) {
            return;
        }
        $otherSide = $entity->getProperty($this->metadata->relationship->property);
        $otherSide->collection = null;
        $otherSide->toAdd[spl_object_hash($this->parent)] = $this->parent;
        $otherSide->modify();
    }