Skip to content

sequelize instance does not have a Model field (import docs) #11424

Closed

Description

@masterl

Issue Description

The import docs present a wrong code:

module.exports = (sequelize, DataTypes) => {
  class Project extends sequelize.Model { }

What was unclear/insufficient/not covered in the documentation

The problem here is that there is no field called Model on the sequelize instance.

If possible: Provide some suggestion on how we can enhance the docs

Throughout the docs, sequelize is used for the Sequelize instance.
And Sequelize is used for what we get when we require('sequelize').
Since Model is a part of Sequelize (with capital S), this part of the doc should be rewritten to Sequelize.Model.

Additional context

Add any other context or screenshots about the issue here.

Issue Template Checklist

Is this issue dialect-specific?

  • No. This issue is relevant to Sequelize as a whole.
  • Yes. This issue only applies to the following dialect(s): XXX, YYY, ZZZ
  • I don't know.

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I don't know how to start, I would need guidance.
  • No, I don't have the time, although I believe I could do it if I had the time...
  • No, I don't have the time and I wouldn't even know how to start.

Activity

  1. added
    docs
    on Sep 12, 2019
  2. papb commented on Sep 14, 2019

    @papb
    Member

    Thanks! I will fix this while I'm making the other docs changes.

  3. self-assigned this
    on Sep 14, 2019
  4. added
    status: wip
    on Sep 14, 2019
  5. removed
    status: wip
    on Jan 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docs

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions