public function executeUpdate(EntityMetadata $metadata, Store $store, array $criteria, array $toUpdate)
    {
        $criteria = $this->getFormatter()->formatQuery($metadata, $store, $criteria);
        return $this->createQueryBuilder($metadata)
            ->update()
            ->setQueryArray($criteria)
            ->setNewObj($toUpdate)
            ->getQuery()
            ->execute();
        ;
    }
public function executeUpdate(EntityMetadata $metadata, Store $store, array $criteria, array $toUpdate)
    {
        $criteria = $this->getFormatter()->formatQuery($metadata, $store, $criteria);
        return $this->createQueryBuilder($metadata)
            ->update()
            ->setQueryArray($criteria)
            ->setNewObj($toUpdate)
            ->getQuery()
            ->execute();
        ;
    }
public function executeUpdate ( EntityMetadata $ metadata , Store $ store , array $ criteria , array $ toUpdate ) { $ criteria = $ this -> getFormatter ( ) -> formatQuery ( $ metadata , $ store , $ criteria ) ; return $ this -> createQueryBuilder ( $ metadata ) -> update ( ) -> setQueryArray ( $ criteria ) -> setNewObj ( $ toUpdate ) -> getQuery ( ) -> execute ( ) ; ; }
Updates a record from the database based on the provided metadata and criteria.

@param   EntityMetadata  $metadata   The model metadata that the database should query against.
@param   Store           $store      The store.
@param   array           $criteria   The query criteria.
@param   array           $toUpdate   The data to update.
@return  array|bool
Updates a record from the database based on the provided metadata and criteria .