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

Commit 0180ecbb by Rui Fortes

changed sort

1 parent 78f218ef
Showing with 12 additions and 1 deletions
......@@ -536,7 +536,18 @@ module.exports = (function() {
}.bind(this)).join(", ")
if (subQuery && mainAttributes) {
mainAttributes = mainAttributes.concat(factory.hasPrimaryKeys ? factory.primaryKeyAttributes : ['id'])
if (factory.hasPrimaryKeys) {
factory.primaryKeyAttributes.forEach(function(keyAtt){
if(mainAttributes.indexOf(keyAtt) == -1){
mainAttributes.push(keyAtt)
}
})
} else {
mainAttributes.push("id")
}
//mainAttributes = mainAttributes.concat(factory.hasPrimaryKeys ? factory.primaryKeyAttributes : ['id'])
}
// Escape attributes
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!