dreamfactory
dreamfactory copied to clipboard
Support for update operator in MongoDB PATCH operation
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.
@MSchaer1985 has filed this request. DF-751