Skip to content

updated model associations methods to reflect sequelize v6 model#888

Merged
theoludwig merged 2 commits into
sequelize:masterfrom
lukashroch:model-methods-types-fix
Jan 24, 2021
Merged

updated model associations methods to reflect sequelize v6 model#888
theoludwig merged 2 commits into
sequelize:masterfrom
lukashroch:model-methods-types-fix

Conversation

@lukashroch

Copy link
Copy Markdown
Collaborator

This updates associations methods signature to reflect sequelize v6 updates and how model is defined. Currently only for compliance with less-strict typings.

  • Build OK
  • Tests OK

@codecov

codecov Bot commented Jan 20, 2021

Copy link
Copy Markdown

Codecov Report

Merging #888 (995624a) into master (58355a1) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #888   +/-   ##
=======================================
  Coverage   95.20%   95.20%           
=======================================
  Files         117      117           
  Lines        1126     1126           
  Branches      129      129           
=======================================
  Hits         1072     1072           
  Misses         22       22           
  Partials       32       32           
Impacted Files Coverage Δ
src/model/model/model.ts 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58355a1...995624a. Read the comment docs.

@theoludwig theoludwig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you have any link to the sequelize doc or could you give examples of how it changes the way to use sequelize-typescript please ?

@lukashroch

Copy link
Copy Markdown
Collaborator Author

It doesn't change how to use the methods... It's just remnants of V5 model definition and how mode was initialized. Your model itself is not passed to base model anymore.

User extends Model<User> -> User extends Model

@theoludwig
theoludwig merged commit 6b1e3ff into sequelize:master Jan 24, 2021
@lukashroch
lukashroch deleted the model-methods-types-fix branch February 6, 2021 10:52
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.

3 participants