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

Commit 18627d19 by Jan Aagaard Meier

seperate -> separate. Closes #4204

1 parent 837c0517
...@@ -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 $findSeperate. - [FIXED] Fix bug with nested includes where a middle include results in a null value which breaks $findSeparate.
# 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.
......
...@@ -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 seperate query // Move comment to a separate 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);
} }
......
...@@ -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.$findSeperate(results, originalOptions); return Model.$findSeparate(results, originalOptions);
}); });
}; };
Model.$findSeperate = function(results, options) { Model.$findSeparate = 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.$findSeperate( return Model.$findSeparate(
results.reduce(function (memo, result) { results.reduce(function (memo, result) {
var associations = result.get(include.association.as); var associations = result.get(include.association.as);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!