You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Person: RealmObject {
var name: String
var age: Int
var children: RealmList<Child>
}
class Child: RealmObject {
var name: String
var favoritePet: Pet?
}
class Pet: RealmObject {
var name: String
var type: String
}
You could register a wildcard keypath like *.*.* which would be equal to listOf("name", "age", "children", "children.name", "children.favoritePet", "children.favoritePet.name", "children.favoritePet.type")
Wildcards should only expand valid paths and ignore an expansion that isn't valid, i.e. children.*.type would only match children.favoritePet.type because it would be the only correct path matching the expanded path.
As a sidenote, the current implementation in the notifier is equivalent to *.*.*.* since we only detect changes 4 nested levels down.
The text was updated successfully, but these errors were encountered:
This is an extension to #7087
Users of the SDK are currently using an API that looks something like this
For a limited number of properties, this is fine, but it quickly becomes unmanageable for larger object graphs. For this reason, it would be nice if the keypath method introduced in https://github.com/realm/realm-core/pull/7087/files#diff-26d19337fc5c7d539cf862de4f09e38ea8b514402b48349adb3713832aee5518R50, would be able to handle
*
as a wildcard property and automatically expand any object references or object lists/sets/maps.E.g. given this object graph:
You could register a wildcard keypath like
*.*.*
which would be equal tolistOf("name", "age", "children", "children.name", "children.favoritePet", "children.favoritePet.name", "children.favoritePet.type")
Wildcards should only expand valid paths and ignore an expansion that isn't valid, i.e.
children.*.type
would only matchchildren.favoritePet.type
because it would be the only correct path matching the expanded path.As a sidenote, the current implementation in the notifier is equivalent to
*.*.*.*
since we only detect changes 4 nested levels down.The text was updated successfully, but these errors were encountered: