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

Given a parent class with two children, running collection.group aggregate function operates against both children

    • Type: Icon: Task Task
    • Resolution: Done
    • 2.4.1
    • Affects Version/s: None
    • Component/s: None
    • None

      Given a parent class with two children, running collection.group aggregate function operates against both children.

      In essence, it does not respect _type, even when given as a :cond argument

      I created a sample app to demonstrate the problem, see the failing spec:

      https://github.com/justinwiley/mongoid_inheritance_group_issue/blob/master/spec/models/delivery_stat_spec.rb

            Assignee:
            Unassigned Unassigned
            Reporter:
            justinwiley Justin Tyler Wiley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: