public function update($entity, $exclusions = [])
    {
        $querySet = new QuerySet();
        $querySet->setParentId($entity->getId());
        $qb = $this->em->createQueryBuilder();
        $qb->update($this->getTableName())
            ->where('id = :id')
            ->setParameter('id', $entity->getId());
        $querySet->append($qb);
        $this->persist($querySet, $entity, $exclusions);

        return $querySet->execute();
    }
public function update($entity, $exclusions = [])
    {
        $querySet = new QuerySet();
        $querySet->setParentId($entity->getId());
        $qb = $this->em->createQueryBuilder();
        $qb->update($this->getTableName())
            ->where('id = :id')
            ->setParameter('id', $entity->getId());
        $querySet->append($qb);
        $this->persist($querySet, $entity, $exclusions);

        return $querySet->execute();
    }
public function update ( $ entity , $ exclusions = [ ] ) { $ querySet = new QuerySet ( ) ; $ querySet -> setParentId ( $ entity -> getId ( ) ) ; $ qb = $ this -> em -> createQueryBuilder ( ) ; $ qb -> update ( $ this -> getTableName ( ) ) -> where ( 'id = :id' ) -> setParameter ( 'id' , $ entity -> getId ( ) ) ; $ querySet -> append ( $ qb ) ; $ this -> persist ( $ querySet , $ entity , $ exclusions ) ; return $ querySet -> execute ( ) ; }
Updates an object into the database.

@param object   $entity     the entity to update
@param string[] $exclusions Ignore updates to these fields

@return bool
Updates an object into the database .