restheart
restheart copied to clipboard
Options Support, i.e. arrayFilter
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.
Added to RESTHeart v7 roadmap https://github.com/SoftInstigate/restheart/discussions/425
@ujibang is this in the 7.x release yet?