When I now update the exampleEmbeddedParam parameter of any of the MyEmbeddedRealmObject's, no new state update for my Flow gets emitted.
I learned that there is a default limitation of a nested hierarchy of 4 for the .asFlow() function, which I can overcome using the keyPaths parameter for the .asFlow() function.
However, from my perspective, the myEmbeddedRealmObjects is on a hierarchy of 2, so I the query should get notified when any of the MyEmbeddedRealmObject's exampleEmbeddedParam gets updated.
This is however not the case and only if I add an explicit keyPaths parameter like .asFlow(listOf("myEmbeddedRealmObjects.*") my query emits an update.
Question
Is it by default, that realmList parameters or any other second level EmbeddedRealmObject changes are ignored unless I explicitly use the keyPaths parameters of the .asFlow() function? And how can I overcome this problem besides using explicit keyPaths parameters for all queries that needs to get updates from embedded realm object parameters?
My Setup
I have the structure of the following two objects:
Additionally I have a query on my database that looks like this:
The problem
When I now update the
exampleEmbeddedParam
parameter of any of theMyEmbeddedRealmObject
's, no new state update for my Flow gets emitted.I learned that there is a default limitation of a nested hierarchy of 4 for the
.asFlow()
function, which I can overcome using thekeyPaths
parameter for the.asFlow()
function.However, from my perspective, the
myEmbeddedRealmObjects
is on a hierarchy of 2, so I the query should get notified when any of theMyEmbeddedRealmObject
'sexampleEmbeddedParam
gets updated.This is however not the case and only if I add an explicit
keyPaths
parameter like.asFlow(listOf("myEmbeddedRealmObjects.*")
my query emits an update.Question
Is it by default, that realmList parameters or any other second level EmbeddedRealmObject changes are ignored unless I explicitly use the
keyPaths
parameters of the.asFlow()
function? And how can I overcome this problem besides using explicitkeyPaths
parameters for all queries that needs to get updates from embedded realm object parameters?Any help is appreciated! Thank you in advance