dreamfactory icon indicating copy to clipboard operation
dreamfactory copied to clipboard

Support for update operator in MongoDB PATCH operation

Open ethan-ho opened this issue 9 years ago • 1 comments

Cross posted on dreamfactorysoftware/df-mongodb#3 . Wasn't sure which is correct place to post this issue.

When I was trying to use $inc operator, e.g. { "$inc": { "comment_count": 5 } } . I'd got following error:

{
    ...
    "message": "Failed to patch records in 'post'.\nThe dollar ($) prefixed field '$inc' in '$inc' is not valid for storage.",
    "code": 500,

Referring to original code on handling PATCH action: $updates = ['$set' => $updates];

All data passed in will be used with $set operator, which broke the possible usage with other MongoDB native operators.

According this official blog post published in Oct 2013, I believe this feature was once supporting in the past, but it's broken now.

ethan-ho avatar May 13 '16 04:05 ethan-ho

@MSchaer1985 has filed this request. DF-751

drewpearce avatar May 17 '16 19:05 drewpearce