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

Model#first and Model#last methods are not adequate

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 12_01_17
    • Affects Version/s: 5.1.3
    • Component/s: None
    • Labels:
      None

      We're running a large project and need to upgrade, but this change makes our upgrade almost impossible.

      I would expect at least a config option to enable default order by _id if no other order provided or raise an error. Because silently returning a first matched record for both #first and #last methods isn't a good solution.

            Assignee:
            Unassigned Unassigned
            Reporter:
            alexs Alexander S.
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: