-
Notifications
You must be signed in to change notification settings - Fork 209
Closed
Description
Description
I'm unable to execute an update with a pipeline such as using the new (upcoming) aggregate $set operator. This fails before the command is executed as shown below.
I presume that support simply hasn't been added yet, but can you say if/when it will be supported, or if there's a workaround I can use to execute this?
Thank you.
Environment
PHP 7.2.16 on Mac OS X
Tried with latest stable driver 1.5.5 and also 1.6.0alpha2.
Test Script
<?php
$batch = new MongoDB\Driver\BulkWrite(['ordered'=>true]);
$batch->update(
[ ],
[ [ '$set' => ['foo'=>'bar'] ] ], // <- aggregate pipeline
[ 'limit' => 0 ]
);
Expected and Actual Behavior
Fails with MongoDB\Driver\Exception\InvalidArgumentException:
invalid argument for replace: keys cannot begin with "$": "$set"
Metadata
Metadata
Assignees
Labels
No labels