public function update($data, $criteria)
{
$where = $criteria->getCondition();
$parameters = $criteria->getParameters()->toArray();
$command = $this->getBuilder()->createUpdateCommand($data, $where, $parameters);
$this->onCreateCommand($command, $criteria);
$command->prepare();
return $this->onExecuteCommand($command, $command->execute());
}