-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
Mongoid has one place in master where it calls `collection.find.aggregate`.:
lib/mongoid/contextual/aggregable/mongo.rb: result = collection.find.aggregate(pipeline(field), session: _session).to_a
This usage can cause issues if https://jira.mongodb.org/browse/RUBY-2797 is implemented to pass find view parameters to the aggregation pipeline.
Mongoid should simply invoke aggregate directly on the collection, as is documented in https://www.mongodb.com/docs/ruby-driver/master/reference/aggregation/.
- related to
-
RUBY-2797 Forward find conditions to View#aggregate
- Closed
- links to