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

OrderBy accepts a dictionary of properties and directions, but dictionary iteration order is not guaranteed #9

Closed
jamesfer opened this issue Mar 2, 2018 · 1 comment

Comments

@jamesfer
Copy link
Owner

jamesfer commented Mar 2, 2018

query.orderBy({
  name: 'ASC',
  occupation: 'DESC',
})

In the above example, it is not guaranteed that name will appear first in the final output query.

Arrays should be used instead to control individual property's iteration direction. Eg:

query.orderBy([
  'name',
  [ 'occupation', 'DESC' ]
})

When the individual direction is unspecified, as it is for name above, it should default to ASC or whatever was provided in the dir argument.

jamesfer pushed a commit that referenced this issue Jun 18, 2018
# [3.5.0](v3.4.1...v3.5.0) (2018-06-18)

### Bug Fixes

* **OrderBy:** remove deprecation notice about old constraint style ([2c35ac9](2c35ac9))

### Features

* **OrderBy:** add new order by constraint style ([2324831](2324831)), closes [#9](#9)

[skip ci]
@jamesfer
Copy link
Owner Author

🎉 This issue has been resolved in version 3.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant