不要怂,就是干,撸起袖子干!

Commit 2c06293c by Mirko Jotic Committed by Sushant

fix(types): add Paranoid to Includeable (#10804)

1 parent 4f71cb2d
Showing with 9 additions and 1 deletions
......@@ -340,7 +340,7 @@ export type Includeable = typeof Model | Association | IncludeOptions | { all: t
/**
* Complex include options
*/
export interface IncludeOptions extends Filterable, Projectable {
export interface IncludeOptions extends Filterable, Projectable, Paranoid {
/**
* The model you want to eagerly load
*/
......
......@@ -9,8 +9,16 @@ class MyModel extends Model {
}
}
class OtherModel extends Model {}
const assoc: Association = MyModel.associations.other;
MyModel.findOne({
include: [
{ model: OtherModel, paranoid: true }
]
});
const sequelize = new Sequelize('mysql://user:user@localhost:3306/mydb');
MyModel.init({}, {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!