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

Commit 2ce99900 by Mick Hansen

Merge branch 'master' of https://github.com/GuilhermeReda/sequelize into GuilhermeReda-master

2 parents 68709eea 37bc8a08
Showing with 1 additions and 1 deletions
......@@ -1094,7 +1094,7 @@ module.exports = (function() {
if (association.associationType !== 'BelongsTo') {
// Alias the left attribute if the left attribute is not from a subqueried main table
// When doing a query like SELECT aliasedKey FROM (SELECT primaryKey FROM primaryTable) only aliasedKey is available to the join, this is not the case when doing a regular select where you can't used the aliased attribute
if (!subQuery || (subQuery && !include.subQuery && include.parent.model !== mainModel)) {
if (!subQuery || (subQuery && include.parent.model !== mainModel)) {
if (left.rawAttributes[attrLeft].field) {
attrLeft = left.rawAttributes[attrLeft].field;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!