src/orm/classes/Table.php
public function update(ORM_Entity $entity)
    {
        $pKey = $this->getPrimaryKey();
        $columns = $this->getColumns();
        $q = Eresus_DB::getHandler()->createUpdateQuery();
        $q->update($this->getName())->
            where($q->expr->eq($pKey,
                $q->bindValue($entity->$pKey, null, $columns[$pKey]->getPdoType())
            ));
        $this->bindValuesToQuery($entity, $q);
        $newQuery = $entity->beforeSave($q);
        if ($newQuery instanceof ezcQuery)
        {
            $q = $newQuery;
        }
        $q->execute();
        $entity->afterSave();
    }
public function update(ORM_Entity $entity)
    {
        $pKey = $this->getPrimaryKey();
        $columns = $this->getColumns();
        $q = Eresus_DB::getHandler()->createUpdateQuery();
        $q->update($this->getName())->
            where($q->expr->eq($pKey,
                $q->bindValue($entity->$pKey, null, $columns[$pKey]->getPdoType())
            ));
        $this->bindValuesToQuery($entity, $q);
        $newQuery = $entity->beforeSave($q);
        if ($newQuery instanceof ezcQuery)
        {
            $q = $newQuery;
        }
        $q->execute();
        $entity->afterSave();
    }
Обновляет сущность в таблице

@param ORM_Entity $entity

@return void

@since 1.00