> t.find(
{x:1})
{ "_id" : ObjectId("4e8634b96c26412b2e1418b4"), "x" : 1, "y" : [ 2, 3, 4, "abc", "xyz" ] }>
> t.update(
, {$pull:{y:3}})
> t.find(
)
{ "_id" : ObjectId("4e8634b96c26412b2e1418b4"), "x" : 1, "y" : [ 2, 4, "abc", "xyz" ] }>
> t.update(
, {$pull:{y:{$lt:3}}})
> t.find(
)
{ "_id" : ObjectId("4e8634b96c26412b2e1418b4"), "x" : 1, "y" : [ 4, "abc", "xyz" ] }> t.update(
{x:1}, {$pull:{y:/yz/}})
> t.find(
)
{ "_id" : ObjectId("4e8634b96c26412b2e1418b4"), "x" : 1, "y" : [ 4, "abc", "xyz" ] }- is related to
-
SERVER-2016 $pull with $elemMatch and $in does not work
- Closed