Skip to content

docs: typo in associations.md - #10157

Merged
sushantdhiman merged 1 commit into
sequelize:masterfrom
ggarek:patch-1
Nov 14, 2018
Merged

docs: typo in associations.md#10157
sushantdhiman merged 1 commit into
sequelize:masterfrom
ggarek:patch-1

Conversation

@ggarek

@ggarek ggarek commented Nov 13, 2018

Copy link
Copy Markdown
Contributor

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

codecov Bot commented Nov 13, 2018

Copy link
Copy Markdown

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
@sushantdhiman

Copy link
Copy Markdown
Contributor

Thanks @ggarek

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.

2 participants