lib/Doctrine/ORM/QueryBuilder.php
public function set($key, $value)
    {
        return $this->add('set', new Expr\Comparison($key, Expr\Comparison::EQ, $value), true);
    }
public function set($key, $value)
    {
        return $this->add('set', new Expr\Comparison($key, Expr\Comparison::EQ, $value), true);
    }
public function set ( $ key , $ value ) { return $ this -> add ( 'set' , new Expr \ Comparison ( $ key , Expr \ Comparison :: EQ , $ value ) , true ) ; }
Sets a new value for a field in a bulk update query.

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

@param string $key   The key/field to set.
@param string $value The value, expression, placeholder, etc.

@return self
Sets a new value for a field in a bulk update query .