Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rorbech opened this issue Jun 2, 2023 · 1 comment · Fixed by #6705
Closed

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

rorbech opened this issue Jun 2, 2023 · 1 comment · Fixed by #6705
Assignees

Comments

@rorbech
Copy link
Contributor

rorbech commented Jun 2, 2023

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

@nicola-cab
Copy link
Member

Just a small note on the issue, this was not only a C-API related problem.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants
@nicola-cab @rorbech and others