Skip to content

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

@knrdl

Description

@knrdl

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions