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

criteria returning incorrect number of record using limit

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

      i have more than 100 records that match this query, but whatever I do, mongoid gives me back 100. anyone have any idea what i could have done wrong? thanks in advance.

      irb(main):094:0> RouteStart.where({ :location => {"$nearSphere" => coordinates1, "$maxDistance" => d.fdiv(6378.137)}}).limit(5).count
      => 100
      irb(main):095:0> RouteStart.where({ :location => {"$nearSphere" => coordinates1, "$maxDistance" => d.fdiv(6378.137)}}).limit(1000).count
      => 100

            Assignee:
            Unassigned Unassigned
            Reporter:
            hsunami hsunami
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: