Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-2137

Inconsistent behaviour on type mismatch in queries.

    • Type: Icon: Task Task
    • Resolution: Gone away
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      There has been a change in semantics with:

      * 3648014ff (HEAD) RCORE-2131: Don't throw immediately when convertion of string to number fails (#7715)
      

      Trying to use an int in a query where a string is expected will throw an error, but the same is no longer true for bool.

      Unable to find source-code formatter for language: dart. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      realm.all<Car>().query(r'make == $0', [1]); // will throw, but 
      realm.all<Dog>().query(r'age == $0', [true]); // this will not
      

      This is inconsistent, and a change as compared to v14.7.0.

            Assignee:
            jorgen.edelbo@mongodb.com Jørgen Edelbo
            Reporter:
            unitosyncbot Unito Sync Bot
            AD Sync Client
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: