summaryrefslogtreecommitdiff
path: root/src/mongo/client/dbclient_mockcursor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/client/dbclient_mockcursor.cpp')
-rw-r--r--src/mongo/client/dbclient_mockcursor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/client/dbclient_mockcursor.cpp b/src/mongo/client/dbclient_mockcursor.cpp
index d70fe3b3d06..40b505c7abe 100644
--- a/src/mongo/client/dbclient_mockcursor.cpp
+++ b/src/mongo/client/dbclient_mockcursor.cpp
@@ -74,7 +74,7 @@ void DBClientMockCursor::_fillNextBatch() {
int leftInBatch = _batchSize;
batch.objs.clear();
while (_iter.more() && (!_batchSize || leftInBatch--)) {
- batch.objs.emplace_back(_iter.next().Obj());
+ batch.objs.emplace_back(_iter.next().Obj().getOwned());
}
batch.pos = 0;
@@ -92,4 +92,4 @@ boost::optional<BSONObj> DBClientMockCursor::getPostBatchResumeToken() const {
return _postBatchResumeToken;
}
-} // namespace mongo \ No newline at end of file
+} // namespace mongo