Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 2c06293c
authored
Apr 22, 2019
by
Mirko Jotic
Committed by
Sushant
Apr 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(types): add Paranoid to Includeable (#10804)
1 parent
4f71cb2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
types/lib/model.d.ts
types/test/model.ts
types/lib/model.d.ts
View file @
2c06293
...
@@ -340,7 +340,7 @@ export type Includeable = typeof Model | Association | IncludeOptions | { all: t
...
@@ -340,7 +340,7 @@ export type Includeable = typeof Model | Association | IncludeOptions | { all: t
/**
/**
* Complex include options
* Complex include options
*/
*/
export
interface
IncludeOptions
extends
Filterable
,
Projectable
{
export
interface
IncludeOptions
extends
Filterable
,
Projectable
,
Paranoid
{
/**
/**
* The model you want to eagerly load
* The model you want to eagerly load
*/
*/
...
...
types/test/model.ts
View file @
2c06293
...
@@ -9,8 +9,16 @@ class MyModel extends Model {
...
@@ -9,8 +9,16 @@ class MyModel extends Model {
}
}
}
}
class
OtherModel
extends
Model
{}
const
assoc
:
Association
=
MyModel
.
associations
.
other
;
const
assoc
:
Association
=
MyModel
.
associations
.
other
;
MyModel
.
findOne
({
include
:
[
{
model
:
OtherModel
,
paranoid
:
true
}
]
});
const
sequelize
=
new
Sequelize
(
'mysql://user:user@localhost:3306/mydb'
);
const
sequelize
=
new
Sequelize
(
'mysql://user:user@localhost:3306/mydb'
);
MyModel
.
init
({},
{
MyModel
.
init
({},
{
...
@@ -23,4 +31,4 @@ MyModel.init({}, {
...
@@ -23,4 +31,4 @@ MyModel.init({}, {
],
],
sequelize
,
sequelize
,
tableName
:
'my_model'
tableName
:
'my_model'
});
});
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment