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

Querying on IDs passed as Strings instead of BSON::ObjectId instances returns 0 results

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.1.3
    • Component/s: None
    • None

      Currently in the process of upgrading from 4.x to 5.x and it seems that either in the driver or the new mongo code (2.6 -> 3.0), if IDs passed to a query are passed using a `String`, no results will be found, but if I pass a `BSON::ObjectId(String)`, it suddenly works.

      Any ideas?

      Thanks!

            Assignee:
            emily.stolfo Emily Stolfo
            Reporter:
            cblage Carlos Brito Lage
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: