Closed serhii-k closed 3 months ago
β€ PM Bot commented:
Jira ticket: RDART-1073
It turns out that it was implemented this way to optimize performance.
And there is another method, changesFor([keyPaths]), which takes into account how deep you want to observe changes. So it's possible to specify the following keyPaths:
b.value
to trigger changes if b.value
was changedb.*
if any property of b
was changed*.*
if any property of any linked object was changeda.changesFor(['*', 'b.value']).listen((changes) => print('B changed ${changes.properties}'));
So, the only request about this ticket is to please mention the correct way to register a RealmObject Change Listener here:
There is no any bug here. Realm is soooooo COOL! π€©
@serhii-k Just back from vacation. Happy you worked it out π
What happened?
I've encountered this bug with a device synced realm but replicated it in a simple local-only example.
Let's say our schema contains three RealmModels:
value
b
list
In our realm, we have one instance of each:
Also, we are listening to the following changes:
Now, when we modify the
value
insidea.b
:Please see the full example to understand the problem more clearly.
Repro steps
1. schemas.dart
2. main.dart
The output
Version
3.3.0
What Atlas Services are you using?
Atlas Device Sync
What type of application is this?
Flutter Application
Client OS and version
Android 14 (SDK 34)
Code snippets
No response
Stacktrace of the exception/crash you're getting
No response
Relevant log output
No response