src/orm/classes/Field/Entity.php
public function orm2pdo($ormValue)
    {
        if (is_null($ormValue))
        {
            return null;
        }
        $validClass = $this->getParam('class');
        if (!($ormValue instanceof $validClass))
        {
            throw new InvalidArgumentException('Argument 1 must be an instance of ' . $validClass);
        }
        if (!($ormValue instanceof ORM_Entity))
        {
            throw new InvalidArgumentException('Argument 1 must be an instance of ORM_Entity');
        }
        /* @var ORM_Entity $ormValue */
        return $ormValue->getPrimaryKey();
    }
public function orm2pdo($ormValue)
    {
        if (is_null($ormValue))
        {
            return null;
        }
        $validClass = $this->getParam('class');
        if (!($ormValue instanceof $validClass))
        {
            throw new InvalidArgumentException('Argument 1 must be an instance of ' . $validClass);
        }
        if (!($ormValue instanceof ORM_Entity))
        {
            throw new InvalidArgumentException('Argument 1 must be an instance of ORM_Entity');
        }
        /* @var ORM_Entity $ormValue */
        return $ormValue->getPrimaryKey();
    }
Преобразует значение ORM в значение PDO

@param mixed $ormValue

@throws InvalidArgumentException

@return mixed

@since 3.00