Nextras\Orm\Repository\PersistenceHelper::addRelationshipToQueue PHP Метод

addRelationshipToQueue() защищенный статический Метод

protected static addRelationshipToQueue ( Nextras\Orm\Entity\IEntity $entity, PropertyMetadata $propertyMeta, Nextras\Orm\Model\IModel $model )
$entity Nextras\Orm\Entity\IEntity
$propertyMeta Nextras\Orm\Entity\Reflection\PropertyMetadata
$model Nextras\Orm\Model\IModel
    protected static function addRelationshipToQueue(IEntity $entity, PropertyMetadata $propertyMeta, IModel $model)
    {
        $isPersisted = $entity->isPersisted();
        $rawValue = $entity->getRawProperty($propertyMeta->name);
        if ($rawValue === null && ($propertyMeta->isNullable || $isPersisted)) {
            return;
        } elseif (!$entity->getProperty($propertyMeta->name)->isLoaded() && $isPersisted) {
            return;
        }
        $value = $entity->getValue($propertyMeta->name);
        $rel = $propertyMeta->relationship;
        if ($value instanceof IEntity && !$value->isPersisted() && ($rel->type !== Relationship::ONE_HAS_ONE || $rel->isMain)) {
            self::visitEntity($value, $model);
        } elseif ($value !== null) {
            self::$inputQueue[] = $value;
        }
    }