Skip to content

fix(sequelize): exclude undefined values from where filter #10128

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

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

KalleV
Copy link
Contributor

@KalleV KalleV commented Oct 24, 2023

Passing "undefined" to a where filter value will lead to a "NULL" query internally. This causes issues with backward compatibility for application business logic using optional values since the Juggler ORM omits "undefined" values from the internal SQL queries.

Fixes: #10129

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

👉 Check out how to submit a PR 👈

@KalleV KalleV marked this pull request as ready for review November 14, 2023 15:28
@KalleV KalleV requested a review from samarpanB as a code owner November 14, 2023 15:28
@coveralls
Copy link

Pull Request Test Coverage Report for Build 6865677079

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 57.043%

Totals Coverage Status
Change from base Build 6859944355: 0.0%
Covered Lines: 9567
Relevant Lines: 12461

💛 - Coveralls

@samarpanB samarpanB merged commit 8292615 into loopbackio:master Nov 15, 2023
@KalleV KalleV deleted the KalleV-where-filter-test branch November 15, 2023 21:02
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

Successfully merging this pull request may close these issues.

[@loopback/sequelize] Regression in query behavior when undefined values passed to "where" filter
3 participants