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

Commit cb94fa88 by Mick Hansen

Make previous tests run atleast

1 parent 30bd3b08
......@@ -538,7 +538,7 @@ module.exports = (function() {
return self.quoteIdentifier(as) + "." + self.quoteIdentifier(attr) + " AS " + self.quoteIdentifier(as + "." + attr)
})
if (subQuery && include.hasIncludeRequired || include.required) {
if (subQuery && (include.hasIncludeRequired || include.required)) {
subQueryAttributes = subQueryAttributes.concat(attributes)
} else {
mainAttributes = mainAttributes.concat(attributes)
......@@ -553,7 +553,7 @@ module.exports = (function() {
})
if (options.includeIgnoreAttributes !== false) {
if (subQuery && include.hasIncludeRequired || include.required) {
if (subQuery && (include.hasIncludeRequired || include.required)) {
subQueryAttributes = subQueryAttributes.concat(attributes)
} else {
mainAttributes = mainAttributes.concat(throughAttributes)
......@@ -610,7 +610,7 @@ module.exports = (function() {
options.include.forEach(function(include) {
var joinQueryItem = generateJoinQuery(include, tableName)
if (include.hasIncludeWhere || include.where) {
if (subQuery && (include.hasIncludeWhere || include.where)) {
subJoinQueries.push(joinQueryItem)
} else {
mainJoinQueries.push(joinQueryItem)
......
......@@ -889,7 +889,7 @@ describe(Support.getTestDialectTeaser("Include"), function () {
})
})
it.only('should be possible to extend the on clause with a where option on nested includes', function (done) {
it('should be possible to extend the on clause with a where option on nested includes', function (done) {
var User = this.sequelize.define('User', {})
, Product = this.sequelize.define('Product', {
title: DataTypes.STRING
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!