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 3a44cd4e
authored
Sep 18, 2015
by
overlookmotel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose Association constructor as `Sequelize.Association`
1 parent
1a272c85
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletions
changelog.md
lib/associations/index.js
lib/sequelize.js
changelog.md
View file @
3a44cd4
# Next
-
[
FIXED
]
Calling set with dot.separated key on a JSON/JSONB attribute will not flag the entire object as changed
[
#4379
](
https://github.com/sequelize/sequelize/pull/4379
)
-
[
ADDED
]
Expose Association constructor as
`Sequelize.Association`
# 3.9.0
-
[
ADDED
]
beforeRestore/afterRestore hooks
[
#4371
](
https://github.com/sequelize/sequelize/issues/4371
)
...
...
lib/associations/index.js
0 → 100644
View file @
3a44cd4
'use strict'
;
var
Association
=
require
(
'./base'
);
Association
.
BelongsTo
=
require
(
'./belongs-to'
);
Association
.
HasOne
=
require
(
'./has-one'
);
Association
.
HasMany
=
require
(
'./has-many'
);
Association
.
BelongsToMany
=
require
(
'./belongs-to-many'
);
module
.
exports
=
Association
;
lib/sequelize.js
View file @
3a44cd4
...
...
@@ -13,7 +13,8 @@ var url = require('url')
,
sequelizeErrors
=
require
(
'./errors'
)
,
Promise
=
require
(
'./promise'
)
,
Hooks
=
require
(
'./hooks'
)
,
Instance
=
require
(
'./instance'
);
,
Instance
=
require
(
'./instance'
)
,
Association
=
require
(
'./associations/index'
);
/**
* This is the main class, the entry point to sequelize. To use it, you just need to import sequelize:
...
...
@@ -304,6 +305,13 @@ Sequelize.prototype.Deferrable = Sequelize.Deferrable = Deferrable;
Sequelize
.
prototype
.
Instance
=
Sequelize
.
Instance
=
Instance
;
/**
* A reference to the sequelize association class.
* @property Association
* @see {Association}
*/
Sequelize
.
prototype
.
Association
=
Sequelize
.
Association
=
Association
;
/**
* Allow hooks to be defined on Sequelize + on sequelize instance as universal hooks to run on all models
* and on Sequelize/sequelize methods e.g. Sequelize(), Sequelize#define()
*/
...
...
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