diff options
author | Matt Dannenberg <matt.dannenberg@10gen.com> | 2013-05-16 15:17:54 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2013-06-18 12:51:15 -0400 |
commit | d9c570d95817d3a17c08f5cfab98112f55220a64 (patch) | |
tree | 61d97b626a519d74ab211519dd41b24e695f0891 /src/mongo/db/pipeline/document_source_project.cpp | |
parent | c020b94a9e3154cf0b18ea8e504992f2ab3ae885 (diff) | |
download | mongo-d9c570d95817d3a17c08f5cfab98112f55220a64.tar.gz |
exchanged toBson(Obj|Array) to serialize in agg
Diffstat (limited to 'src/mongo/db/pipeline/document_source_project.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_project.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/db/pipeline/document_source_project.cpp b/src/mongo/db/pipeline/document_source_project.cpp index 17fcb98c42d..ba15aeba8fc 100644 --- a/src/mongo/db/pipeline/document_source_project.cpp +++ b/src/mongo/db/pipeline/document_source_project.cpp @@ -95,11 +95,8 @@ namespace mongo { pEO = dynamic_pointer_cast<ExpressionObject>(pE); } - void DocumentSourceProject::sourceToBson( - BSONObjBuilder *pBuilder, bool explain) const { - BSONObjBuilder insides; - pEO->documentToBson(&insides, true); - pBuilder->append(projectName, insides.done()); + void DocumentSourceProject::sourceToBson(BSONObjBuilder* pBuilder, bool explain) const { + *pBuilder << projectName << pEO->serialize(); } intrusive_ptr<DocumentSource> DocumentSourceProject::createFromBson( |