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

[C-API] Querying with object list arguments does not work

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

      Expected results

      Queries with objects in list arguments should work

      Ex. passing object references to the IN operator as in this Kotlin test should match the objects that points to the given argument objects:

      val child = realm.writeBlocking {
          val child = copyToRealm(QuerySample().apply { stringField = "child" })
          copyToRealm(QuerySample().apply { nullableRealmObject = child })
          child
      }
      
      val result = realm.query<QuerySample>("nullableRealmObject IN $0", listOf(even, odd)).find()
      assertEquals(1, result.size)
      

      Actual Results

      The above query does not return any result. A C-API test of the same has been written in https://github.com/realm/realm-core/pull/6686/files

      Steps & Code to Reproduce

      See https://github.com/realm/realm-core/pull/6686/files

      Core version

      Core version: 13.11.0 - https://github.com/realm/realm-core/tree/d8721d7baec39571e7e5373c3f407a50d144307e

            Assignee:
            nicola.cabiddu@mongodb.com Nicola Cabiddu
            Reporter:
            claus.rorbech@mongodb.com Claus Rørbech (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: