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

findAll() and findAllAsync() get different result for same query. #3214

Closed
A86S opened this issue Jul 26, 2016 · 3 comments
Closed

findAll() and findAllAsync() get different result for same query. #3214

A86S opened this issue Jul 26, 2016 · 3 comments

Comments

@A86S
Copy link

A86S commented Jul 26, 2016

I have apply findAll() and findAllAsync() on same query but getting different result.

Query 1 : realm.where(Model.class).equalTo(ModelColumns.IS_FAV_USER, "yes", Case.INSENSITIVE).findAll().sort(ModelColumns.USERNAME, Sort.ASCENDING);
*result - 0

Query 2 : realm.where(Model.class).equalTo(ModelColumns.IS_FAV_USER, "yes", Case.INSENSITIVE).findAllAsync().sort(ModelColumns.USERNAME , Sort.ASCENDING);
*result - 1

Android Studio Version : 2.2 Preview 5
Realm Version : 1.1.0

please let me know , am i doing something wrong here ?

Thanks.

@Zhuinden
Copy link
Contributor

You should use findAllSorted() and findAllSortedAsync() instead of findAll().sort() and findAllAsync().sort().

@A86S
Copy link
Author

A86S commented Jul 26, 2016

ok thanks @Zhuinden it working perfectly with findAllSorted and findAllSortedAsync() but having different result while using findAll().sort() and findAllAsync().sort().

@A86S A86S closed this as completed Jul 26, 2016
@A86S
Copy link
Author

A86S commented Jul 26, 2016

@Zhuinden i have on query which i have posted here #1080 can you please guide me over that.

Thanks

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants