-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Fully Compatible
-
Integration 2016-08-29
As a special case, when transforming a find into an aggregation for a query on a view, the singleBatch option will be dropped if specified when the limit is exactly 1. This allows queries that specify {limit: 1, singleBatch: true} to be sent against a view; without this, the aggregation system would reject the transformed command.
This allows some driver implementations of find_one() to work with views.
Original Description
Drivers that implement the CRUD specification may send the singleBatch option to implement methods like find_one() (for example, PyMongo does this).
This works for the find command, but the aggregation command does not support it. This makes it impossible to perform a find_one on a view namespace, as it translates all query operations into aggregations.
- depends on
-
SERVER-25190 Unit tests for view transformations to/from aggregation
- Closed
- related to
-
SERVER-24766 implement basic view functionality
- Closed