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

inconsistent return of data with with(:collection) specifier

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

      class Orange
      include Mongoid::Document

      field :a
      end

      class Apple
      include Mongoid::Document

      field :a
      end

      Orange.create!

      query = Apple.with(collection: "oranges")

      First time running

      query.count => 1

      subsequent times

      query.count => 0

            Assignee:
            durran Durran Jordan
            Reporter:
            makeshifthoop makeshifthoop
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: