Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-4704

Project referenced associations with #only

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Associations
    • Labels:

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: