Search code examples
feathersjsnedb

use modifier $addToSet, $push or $pull with feathersjs and NeDB


How can I use the modifiers $addToSet, $pull or $push with a NeDB adapter for feathersjs? Following did not work and I cannot find anything in the documentation.

service('projects').update("<id>", { $addToSet: { assignedIds: "<newId>" } });
service('projects').patch("<id>", { $addToSet: { assignedIds: "<newId>" } });
service('projects').update("<id>", { query: { $addToSet: { assignedIds: "<newId>" } } });

I also tried to put the operator in the params like this (as stated in the document)

service('projects').update("<id>", { }, { 
    query: { $addToSet: { assignedIds: "<newId>" } } 
});

But the only thing I got back is unknown logical operator $addToSet


Solution

  • As per comment, this was a bug in featherjs that got patched