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

Repository find uppercase version of ordering by nulls doesn't work #8970

Closed
wanton7 opened this issue May 5, 2022 · 0 comments · Fixed by #8978
Closed

Repository find uppercase version of ordering by nulls doesn't work #8970

wanton7 opened this issue May 5, 2022 · 0 comments · Fixed by #8978

Comments

@wanton7
Copy link

wanton7 commented May 5, 2022

Issue Description

Uppercase version of nulls ordering doesn't work

Expected Behavior

Expected uppercase version of nulls ordering to work

Actual Behavior

Uppercase ordering with nulls doesn't work

Steps to Reproduce

With this query

myRepository.find({
  order: {
    myColumn: { direction: 'ASC', nulls: 'FIRST' },
  },
}),

nulls ordering doesn't work.

But with this query it does work

myRepository.find({
  order: {
    myColumn: { direction: 'ASC', nulls: 'first' },
  },
}),

My Environment

Dependency Version
Operating System Windows 10
Node.js version 16.14.0
Typescript version 4.6.3
TypeORM version 0.3.4

Additional Context

Relevant Database Driver(s)

DB Type Reproducible
aurora-mysql no
aurora-postgres no
better-sqlite3 no
cockroachdb no
cordova no
expo no
mongodb no
mysql no
nativescript no
oracle no
postgres yes
react-native no
sap no
spanner no
sqlite no
sqlite-abstract no
sqljs no
sqlserver no

Are you willing to resolve this issue by submitting a Pull Request?

  • ✖️ Yes, I have the time, and I know how to start.
  • ✖️ Yes, I have the time, but I don't know how to start. I would need guidance.
  • ✖️ No, I don’t have the time, but I can support (using donations) development.
  • ✅ No, I don’t have the time and I’m okay to wait for the community / maintainers to resolve this issue.
ahmedosama94 added a commit to ahmedosama94/typeorm that referenced this issue May 9, 2022
ahmedosama94 added a commit to ahmedosama94/typeorm that referenced this issue May 9, 2022
ahmedosama94 added a commit to ahmedosama94/typeorm that referenced this issue May 9, 2022
ahmedosama94 added a commit to ahmedosama94/typeorm that referenced this issue May 9, 2022
AlexMesser added a commit that referenced this issue Aug 25, 2022
…8978)

* fix: resolve FindOptionsOrder.nulls issue to accept FIRST/LAST in uppercase

Closes #8970

* fixed failing test

Co-authored-by: Alex Messer <dmzt08@gmail.com>
nordinh pushed a commit to nordinh/typeorm that referenced this issue Aug 29, 2022
…ypeorm#8978)

* fix: resolve FindOptionsOrder.nulls issue to accept FIRST/LAST in uppercase

Closes typeorm#8970

* fixed failing test

Co-authored-by: Alex Messer <dmzt08@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant