original_string: 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();
          ;
      }
code: 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();
          ;
      }
code_tokens: 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 ( ) ; ; }
docstring: 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
docstring_tokens: Updates a record from the database based on the provided metadata and criteria .