We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Given a schema:
class JsonStyleRealmObject(id: String) : RealmObject { @PrimaryKey @PersistedName("_id") var id: String = id var value: RealmAny? = null }
and a single instance
JsonStyleRealmObject { id = "EMBEDDED" value = realmAnyListOf( listOf(4, 5, 6), mapOf( "key1" to 7, "key2" to 8, "key3" to listOf(9), ) ) }
The following query will not match anything:
realm.query<JsonStyleRealmObject>("value[*][*] == {4, 5, 6}").find()
while the almost similar query (with explicit first index) will match the object:
realm.query<JsonStyleRealmObject>("value[0][*] == {4, 5, 6}").find()
I would expect both queries to yield the same match.
See above.
The actual tests are in Realm Kotlin
Core version: v13.26.0-175-g5c367320a
The text was updated successfully, but these errors were encountered:
➤ PM Bot commented:
Jira ticket: RCORE-1996
Sorry, something went wrong.
This is a wider problem, not only for nested collections. Check this test case:
TEST(Parser_Wildcard) { Group g; auto table = g.add_table("table"); auto origin = g.add_table("origin"); auto col_list = table->add_column_list(type_Mixed, "list"); auto col_link = origin->add_column_list(*table, "link"); auto obj1 = table->create_object().set_json(col_list, R"([4, 5, 6])"); auto obj2 = table->create_object().set_json(col_list, R"([1, 2, 3])"); auto ll = origin->create_object().get_linklist(col_link); ll.add(obj1.get_key()); ll.add(obj2.get_key()); auto q = origin->query("link[0].list = {4, 5, 6}"); CHECK_EQUAL(q.count(), 1); q = origin->query("link.list = {4, 5, 6}"); CHECK_EQUAL(q.count(), 1); // Fails }
jedelbo
Successfully merging a pull request may close this issue.
Expected results
Given a schema:
and a single instance
The following query will not match anything:
while the almost similar query (with explicit first index) will match the object:
I would expect both queries to yield the same match.
See above.
Steps & Code to Reproduce
The actual tests are in Realm Kotlin
Core version
Core version: v13.26.0-175-g5c367320a
The text was updated successfully, but these errors were encountered: