-
Type: Improvement
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.7.1
-
Component/s: None
-
None
From a high level my code:
- Runs an aggregation using "aggregate_raw_batches"
- Maps the resulting cursor to a RawBSONDocument
- Run an insert_many using the results of #2
- Checks the results of the insert_many for the "inserted_id" field.
- Find that this field is always an empty array even when I verified it is correctly inserting documents.
raw_cursor = my_coll.aggregate_raw_batches(multi_sample_pipeline,allowDiskUse=True,maxTimeMS=180)
mapped_docs = map(RawBSONDocument,pedigree_results_bson_cursor)
results = diff_coll.insert_many(mapped_docs,ordered=False)
print(len(results.inserted_ids)) # Seemingly always 0, even when inserting non zero number of documents.
- is documented by
-
PYTHON-3248 Document that inserting RawBSONDocument does not return inserted_id
- Backlog
- related to
-
PYTHON-1820 Properly validate bson document size when creating a RawBSONDocument
- Closed
-
PYTHON-1359 RawBSONDocument example
- Closed