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

RealmSingleQuery with flow doesn't provide latest updates #1623

Closed
gauravbordoloi opened this issue Jan 9, 2024 · 1 comment
Closed

RealmSingleQuery with flow doesn't provide latest updates #1623

gauravbordoloi opened this issue Jan 9, 2024 · 1 comment
Labels

Comments

@gauravbordoloi
Copy link

How frequently does the bug occur?

Always

Description

When we use the below code for getting object change results, it doesn't work.

dbModule.getRealm()
            .query(SaleModel::class, "_id == $0", RealmUUID.from(id))
            .first()
            .asFlow()
            .cancellable()
            .mapLatest {
                it.obj
            }

I have to do like below to get the results

dbModule.getRealm()
            .query(SaleModel::class, "_id == $0", RealmUUID.from(id))
            .asFlow()
            .cancellable()
            .mapLatest {
                it.list.firstOrNull()
            }

Do RealmSingleQuery not support object change?

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

No response

Version

1.13.0

What Atlas App Services are you using?

Local Database only

Are you using encryption?

Yes

Platform OS and version(s)

Android 13

Build environment

No response

@cmelchior
Copy link
Contributor

Hi @gauravbordoloi We have a test for this scenario here:

So it should work.

Can you provide a fully working sample where it doesn't work?

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Jan 15, 2024
@nirinchev nirinchev closed this as not planned Won't fix, can't repro, duplicate, stale Aug 3, 2024
@sync-by-unito sync-by-unito bot closed this as completed Aug 3, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants