The ODM query builder supports atomic update operators, but does not support passing an aggregation pipeline. This could work like this:
$builder
->update()
->field('id')->equals($id)
->pipeline()
// Same syntax as aggregation pipeline builder follows here
We need to evaluate whether it's feasible to use a fluent syntax here, as we likely won't be able to reuse the full ODM aggregation pipeline builder as the execute methods would conflict.