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

docs: typo in associations.md #10157

Merged
merged 1 commit into from Nov 14, 2018
Merged

docs: typo in associations.md #10157

merged 1 commit into from Nov 14, 2018

Conversation

@ggarek
Copy link
Contributor

@ggarek ggarek commented Nov 13, 2018

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Maybe this checklist does not apply to the change.

Description of change

Probably, wrong property was being used in the docs example. This PR fixes this typo.

Looks like the last example should define association rather then model in this case.

Using model the error happens:

Error: Unable to connect to the database TypeError: self._expandAttributes is not a function
    at Function._conformOptions (<...>/node_modules/sequelize/lib/model.js:198:12)
    at Function._conformInclude (<...>/node_modules/sequelize/lib/model.js:264:12)
    at options.include.options.include.map.include (<...>/node_modules/sequelize/lib/model.js:213:59)
    at Array.map (<anonymous>)
    at Function._conformOptions (<...>/node_modules/sequelize/lib/model.js:213:39)
    at new Model (<...>/node_modules/sequelize/lib/model.js:3070:24)
    at new jp_kanji (<...>/node_modules/sequelize/lib/sequelize.js:340:19)
    at Function.build (<...>/node_modules/sequelize/lib/model.js:1966:12)
    at Function.create (<...>/node_modules/sequelize/lib/model.js:2017:17)
    <client code>
Looks like last example should define `association` rather then `model` in this case.

Using `model` the error happens:

```bash
Error: Unable to connect to the database TypeError: self._expandAttributes is not a function
    at Function._conformOptions (<...>/node_modules/sequelize/lib/model.js:198:12)
    at Function._conformInclude (<...>/node_modules/sequelize/lib/model.js:264:12)
    at options.include.options.include.map.include (<...>/node_modules/sequelize/lib/model.js:213:59)
    at Array.map (<anonymous>)
    at Function._conformOptions (<...>/node_modules/sequelize/lib/model.js:213:39)
    at new Model (<...>/node_modules/sequelize/lib/model.js:3070:24)
    at new jp_kanji (<...>/node_modules/sequelize/lib/sequelize.js:340:19)
    at Function.build (<...>/node_modules/sequelize/lib/model.js:1966:12)
    at Function.create (<...>/node_modules/sequelize/lib/model.js:2017:17)
    <client code>
```
@codecov
Copy link

@codecov codecov bot commented Nov 13, 2018

Codecov Report

Merging #10157 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10157   +/-   ##
=======================================
  Coverage   96.35%   96.35%           
=======================================
  Files          63       63           
  Lines        9426     9426           
=======================================
  Hits         9082     9082           
  Misses        344      344

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 c1ac543...11066d2. Read the comment docs.

@sushantdhiman sushantdhiman merged commit f669482 into sequelize:master Nov 14, 2018
4 checks passed
4 checks passed
codecov/patch Coverage not affected when comparing c1ac543...11066d2
Details
codecov/project 96.35% remains the same compared to c1ac543
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sushantdhiman
Copy link
Contributor

@sushantdhiman sushantdhiman commented Nov 14, 2018

Thanks @ggarek

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

Successfully merging this pull request may close these issues.

None yet

2 participants