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

It seems like 0.35 has broken orderBy when used with number fields #549

Closed
lorenzki opened this issue Jan 30, 2020 · 1 comment
Closed
Labels
bug Something isn't working resolved Issue have been resolved but not yet released

Comments

@lorenzki
Copy link
Contributor

I got a model with the number field rank:
static fields() { return { ID: this.string(''), rank: this.number(0), }

When using orderBy until 0.34.x the query result was correctly sorted:

TestModel.query().orderBy('rank').get();

sorted the data in the correct numerical order: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,...

with the update to 0.35.x the number field is sorted alphabetically: 1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9,..

I already took a look at the changes but sadly could not find the source of this bug.

cuebit added a commit to cuebit/vuex-orm that referenced this issue Feb 1, 2020
@cuebit cuebit added bug Something isn't working resolved Issue have been resolved but not yet released labels Feb 1, 2020
@kiaking
Copy link
Member

kiaking commented Feb 1, 2020

Fixed with Vuex ORM 0.35.2! 🎉 Thanks to @cuebit!
https://github.com/vuex-orm/vuex-orm/releases/tag/v0.35.2

@kiaking kiaking closed this as completed Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved Issue have been resolved but not yet released
Projects
None yet
Development

No branches or pull requests

3 participants