-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Minor Change
Currently, #pluck in memory (i.e. on embedded docs) compacts the result before returning, i.e. it removes any `nil` values.
This is undesirable because:
- nil values are useful information, for example, if I want to compare # of nil vs. non-nil.
- The number of plucked results returned may not match the number of documents.
- Mongoid::Criteria#pluck (aggregable) does return nil values, so memory pluck is not consistent with Mongoid.
- ActiveSupport's Array#pluck does return nil values.