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 18627d19
authored
Oct 01, 2015
by
Jan Aagaard Meier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seperate -> separate. Closes #4204
1 parent
837c0517
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
changelog.md
lib/dialects/postgres/query-generator.js
lib/model.js
changelog.md
View file @
18627d1
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
-
coffee-script
-
coffee-script
-
[
FIXED
]
Add limit to
`findOne`
when using queries like
`{ id: { $gt ...`
[
#4416
](
https://github.com/sequelize/sequelize/issues/4416
)
-
[
FIXED
]
Add limit to
`findOne`
when using queries like
`{ id: { $gt ...`
[
#4416
](
https://github.com/sequelize/sequelize/issues/4416
)
-
[
FIXED
]
Include all with scopes
[
#4584
](
https://github.com/sequelize/sequelize/issues/4584
)
-
[
FIXED
]
Include all with scopes
[
#4584
](
https://github.com/sequelize/sequelize/issues/4584
)
-
[
INTERNALS
]
Corrected spelling seperate -> separate
# 3.10.0
# 3.10.0
-
[
ADDED
]
support
`search_path`
for postgres with lots of schemas
[
#4534
](
https://github.com/sequelize/sequelize/pull/4534
)
-
[
ADDED
]
support
`search_path`
for postgres with lots of schemas
[
#4534
](
https://github.com/sequelize/sequelize/pull/4534
)
...
@@ -62,7 +63,7 @@
...
@@ -62,7 +63,7 @@
+
mysql@2.8.0
+
mysql@2.8.0
# 3.5.1
# 3.5.1
-
[
FIXED
]
Fix bug with nested includes where a middle include results in a null value which breaks $findSep
e
rate.
-
[
FIXED
]
Fix bug with nested includes where a middle include results in a null value which breaks $findSep
a
rate.
# 3.5.0
# 3.5.0
-
[
ADDED
]
`include.separate`
with
`include.limit`
support for HasMany associations.
-
[
ADDED
]
`include.separate`
with
`include.limit`
support for HasMany associations.
...
...
lib/dialects/postgres/query-generator.js
View file @
18627d1
...
@@ -57,7 +57,7 @@ var QueryGenerator = {
...
@@ -57,7 +57,7 @@ var QueryGenerator = {
for
(
var
attr
in
attributes
)
{
for
(
var
attr
in
attributes
)
{
if
((
i
=
attributes
[
attr
].
indexOf
(
'COMMENT'
))
!==
-
1
)
{
if
((
i
=
attributes
[
attr
].
indexOf
(
'COMMENT'
))
!==
-
1
)
{
// Move comment to a sep
e
rate query
// Move comment to a sep
a
rate query
comments
+=
'; '
+
attributes
[
attr
].
substring
(
i
);
comments
+=
'; '
+
attributes
[
attr
].
substring
(
i
);
attributes
[
attr
]
=
attributes
[
attr
].
substring
(
0
,
i
);
attributes
[
attr
]
=
attributes
[
attr
].
substring
(
0
,
i
);
}
}
...
...
lib/model.js
View file @
18627d1
...
@@ -1368,11 +1368,11 @@ Model.prototype.findAll = function(options) {
...
@@ -1368,11 +1368,11 @@ Model.prototype.findAll = function(options) {
return
this
.
runHooks
(
'afterFind'
,
results
,
options
);
return
this
.
runHooks
(
'afterFind'
,
results
,
options
);
}
}
}).
then
(
function
(
results
)
{
}).
then
(
function
(
results
)
{
return
Model
.
$findSep
e
rate
(
results
,
originalOptions
);
return
Model
.
$findSep
a
rate
(
results
,
originalOptions
);
});
});
};
};
Model
.
$findSep
e
rate
=
function
(
results
,
options
)
{
Model
.
$findSep
a
rate
=
function
(
results
,
options
)
{
if
(
!
options
.
include
||
options
.
raw
||
!
results
)
return
Promise
.
resolve
(
results
);
if
(
!
options
.
include
||
options
.
raw
||
!
results
)
return
Promise
.
resolve
(
results
);
var
original
=
results
;
var
original
=
results
;
...
@@ -1382,7 +1382,7 @@ Model.$findSeperate = function(results, options) {
...
@@ -1382,7 +1382,7 @@ Model.$findSeperate = function(results, options) {
return
Promise
.
map
(
options
.
include
,
function
(
include
)
{
return
Promise
.
map
(
options
.
include
,
function
(
include
)
{
if
(
!
include
.
separate
)
{
if
(
!
include
.
separate
)
{
return
Model
.
$findSep
e
rate
(
return
Model
.
$findSep
a
rate
(
results
.
reduce
(
function
(
memo
,
result
)
{
results
.
reduce
(
function
(
memo
,
result
)
{
var
associations
=
result
.
get
(
include
.
association
.
as
);
var
associations
=
result
.
get
(
include
.
association
.
as
);
...
...
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