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

Wrapper to skip evolution while querying

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 9.0.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Mongoid currently always (attempts to) evolve values used in a query. However, this behavior may not always be desirable when working with data created by other applications or when working with corrupt data.

      For example, suppose a field is declared of integer type, but the database contains some values which are strings (stringified numbers). A query for these values with string input will mongoize string input to numbers and query for numeric values, which won't find the desired documents.

      ActiveRecord appears to always cast values when querying, which makes more sense because in a RDBMS there is a fixed column type.

            Assignee:
            dmitry.rybakov@mongodb.com Dmitry Rybakov
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: