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

Return model instances from aggregation

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Attributes
    • None

      Currently Mongoid delegates aggregation implementation entirely to the driver and as a result, aggregation results are returned as BSON::Document instances and not Mongoid::Document instances, as documented in https://www.mongodb.com/docs/mongoid/master/reference/associations/#id4. Mongoid should provide a way to retrieve aggregation results as model instances, similar to AR's find_by_sql method.

            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: