-
Notifications
You must be signed in to change notification settings - Fork 96
Open
Description
Hi , iv'e stumbled across a weird problem with mongo $addToSet in patch function,
i am running this code :
service.create({
'test':'1,
'links':['a','b']
})
after that i am doing : super.patch(null,{ '$addToSet': { links: [ 'test1', 'test2', 'test3' ] }}, { 'test':1 });
when looking at the object in the db i see links: ['a','b',test1', 'test2', 'test3' ] which correspond to $addToSet with $each operator as explained in these docs: https://docs.mongodb.com/manual/reference/operator/update/addToSet/#value-to-add-is-an-array
which should of added this array as single element.
what am I missing?
feathers-mongoose version: 8.5.1
mongo 4.2.3
Metadata
Metadata
Assignees
Labels
No labels