-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Associations
Currently #only works on a document's fields and on embedded associations, but not on referenced associations. https://jira.mongodb.org/browse/MONGOID-2681 makes projections correctly propagate into the embedded associations. For referenced associations, Mongoid currently doesn't project (hence retrieves all fields). This is not a major issue in the sense that the application behavior remains correct, just more data is fetched than necessary. However, we can investigate what would be needed to make #only work across referenced associations.
- is related to
-
MONGOID-5034 When excluded from query, embeds many relations are returned as empty array instead of raising MissingAttributeError
- Closed
- related to
-
MONGOID-2681 Using #only with embedded documents sets omitted fields to default values
- Closed