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

desc(:_id) != desc("_id")

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

      I'm using Integer ids. Strange:

      >> House.desc("_id").first.id
      25583
      >> House.desc(:_id).first.id
      1

      My guess is that the default sort for Mongoid documents is getting correctly overridden in the first case, but not in the second due to the symbol vs string thing. Just a guess.

            Assignee:
            durran Durran Jordan
            Reporter:
            gurgeous Adam Doppelt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: