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

Model.count: CountOptions has no attribute 'paranoid' #163

Open
knrdl opened this issue Apr 27, 2018 · 2 comments
Open

Model.count: CountOptions has no attribute 'paranoid' #163

knrdl opened this issue Apr 27, 2018 · 2 comments

Comments

@knrdl
Copy link

knrdl commented Apr 27, 2018

Currently the CountOptions look like this:

export interface CountOptions extends Logging, Transactionable, Filterable, Projectable {
    /**
     * Include options. See `find` for details
     */
    include?: Includeable[]

    /**
     * Apply COUNT(DISTINCT(col))
     */
    distinct?: boolean

    /**
     * GROUP BY in sql
     * Used in conjunction with `attributes`.
     * @see Projectable
     */
    group?: GroupOption
}

However there is no 'paranoid' attribute, but it exists in the implementation. Please add:

paranoid?: boolean

It's likely that other calls are affected, too.

Current workaround:

YourModel.count({paranoid: false} as any)

(Counts all rows, also the ones deleted in paranoid mode)

@felixfbecker
Copy link
Collaborator

Please add:

Just open a PR ;)

@knrdl
Copy link
Author

knrdl commented Apr 27, 2018

Opened PR :)

Saamiyah added a commit to Saamiyah/sequelize that referenced this issue Oct 10, 2018
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

No branches or pull requests

2 participants