You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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-arraywhich should of added this array as single element.
what am I missing?
feathers-mongoose version: 8.5.1
mongo 4.2.3
The text was updated successfully, but these errors were encountered: