Skip to content

fix(sequelize): support "defaultScope" via Model settings #10170

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 Nov 8, 2023

Add support for Model settings scope when using the Sequelize ORM instead of Juggler.

Fixes #10169

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 force-pushed the KalleV-sequelize-default-scope branch from 7a1ebfa to ccb7d3f Compare November 8, 2023 14:34
@KalleV KalleV marked this pull request as ready for review November 8, 2023 14:35
@KalleV KalleV requested a review from samarpanB as a code owner November 8, 2023 14:35
@coveralls
Copy link

coveralls commented Nov 8, 2023

Pull Request Test Coverage Report for Build 6865607158

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.02%) to 57.043%

Files with Coverage Reduction New Missed Lines %
packages/repository-json-schema/src/build-schema.ts 1 80.78%
Totals Coverage Status
Change from base Build 6772438221: 0.02%
Covered Lines: 9567
Relevant Lines: 12461

💛 - Coveralls

Copy link
Contributor

@samarpanB samarpanB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if where clause test cases are added

@KalleV KalleV requested a review from samarpanB November 14, 2023 15:15
@samarpanB samarpanB merged commit 1008cf9 into loopbackio:master Nov 15, 2023
@KalleV KalleV deleted the KalleV-sequelize-default-scope 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] Scope setting on Loopback Model is ignored by Sequelize extension
3 participants