Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
Fully Compatible
-
ALL
-
Quint Iteration 3.1.2, Quint Iteration 3
Description
The match details aren't passed in when find and modify calls transform() so positional operator projection doesn't work yet.
c = db.c;
|
c.drop();
|
|
|
c.save( { a:[ 1, 2 ] } );
|
|
|
// Does the expected projection.
|
printjson( c.find( { a:2 }, { 'a.$':1 } ).toArray() );
|
|
|
// Doesn't do the expected projection.
|
printjson( c.findAndModify( { query:{ a:2 }, fields:{ 'a.$':1 }, remove:true } ) );
|
Attachments
Issue Links
- duplicates
-
SERVER-16063 Rewrite findAndModify
-
- Closed
-
- related to
-
SERVER-6868 prevent use of positional projection with a simple _id query; assert if a positional projection is requested and no match details are supplied
-
- Closed
-
-
DOCS-6107 Documenting positional operator behavior with find and modify
-
- Closed
-