Basically try to do the same as:
UPDATE table SET column3 = column1 + column2;
In the Doctrine2's ODM QueryBuilder - is something like this possible with out MapReduce? I have a sharded collection, so I need to use the QueryBuilder in order to search by my compound shard key.
Simplified exmaple:
$visit = $this->dm->createQueryBuilder('Visit')
->findAndUpdate()
->field('site')->equals( $site )
->field('timeStamp')->equals( $ts )
->field('_id')->equals( $id )
->update()
->field('column3')->set( 'column1 + column2' );
Unfortunately, that would set column3
to the string "column1 + column2". Any ideas?