restheart icon indicating copy to clipboard operation
restheart copied to clipboard

Options Support, i.e. arrayFilter

Open kevinsandow opened this issue 3 years ago • 2 comments

Options is the third parameter for the updateMany method, but is currently hard coded to DO_NOT_UPSERT.

Expected Behavior

Support of the following would be nice:

updateMany(
  { 'foo': { $elemMatch: { 'bar': 0 } } },
  { $set: { 'foo.$[x].bar': 1 } },
  { arrayFilters: [{ 'x.bar': 0 }] }
)

Current Behavior

At the moment I have to request the whole document, update the document manually with code and patch it afterwards.

Possible Implementation

Support another parameter options next to filter and pass additional options to mongodb.

kevinsandow avatar Dec 01 '20 16:12 kevinsandow

Added to RESTHeart v7 roadmap https://github.com/SoftInstigate/restheart/discussions/425

ujibang avatar Jan 03 '22 09:01 ujibang

@ujibang is this in the 7.x release yet?

mkjsix avatar Jan 02 '23 14:01 mkjsix