lib/Doctrine/ORM/QueryBuilder.php
public function update($update = null, $alias = null)
    {
        $this->type = self::UPDATE;

        if (! $update) {
            return $this;
        }

        return $this->add('from', new Expr\From($update, $alias));
    }
public function update($update = null, $alias = null)
    {
        $this->type = self::UPDATE;

        if (! $update) {
            return $this;
        }

        return $this->add('from', new Expr\From($update, $alias));
    }
public function update ( $ update = null , $ alias = null ) { $ this -> type = self :: UPDATE ; if ( ! $ update ) { return $ this ; } return $ this -> add ( 'from' , new Expr \ From ( $ update , $ alias ) ) ; }
Turns the query being built into a bulk update query that ranges over
a certain entity type.

<code>
$qb = $em->createQueryBuilder()
->update('User', 'u')
->set('u.password', '?1')
->where('u.id = ?2');
</code>

@param string $update The class/type whose instances are subject to the update.
@param string $alias  The class/type alias used in the constructed query.

@return self
Turns the query being built into a bulk update query that ranges over a certain entity type .