[SERVER-452] make $pull support object matching Created: 02/Dec/09  Updated: 12/Jul/16  Resolved: 11/Dec/09

Status: Closed
Project: Core Server
Component/s: Write Ops
Affects Version/s: None
Fix Version/s: 1.3.0

Type: Improvement Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Participants:

 Description   

if you have
{ a : [

{ x : 1 }

,

{ x : 1 , b : 2 }

] }
and do this update:
{ $pull : { a :

{ x : 1 }

} }
previously it would have only removed the first entry, now it will do both

you can also do things like:
{ $pull : { a : { x :

{ $gt : 5 }

} } }



 Comments   
Comment by auto [ 11/Dec/09 ]

Author:

{'name': 'Eliot Horowitz', 'email': 'eliot@10gen.com'}

Message: $pull uses a matcher now, so partial matches are supported
and things like { $pull : { a : { x :

{ $gt : 5 }

} } }
SERVER-452
http://github.com/mongodb/mongo/commit/85799367e759ed309a1103659560799bd37dbcc8

Generated at Thu Feb 08 02:54:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.