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

Commit 4952dca4 by sdepold

dont modify attributes but rawAttributes

1 parent 1abe41ba
......@@ -22,7 +22,7 @@ module.exports = (function() {
this.identifier = this.options.foreignKey || Utils._.underscoredIf(Utils.singularize(this.target.tableName) + "Id", this.source.options.underscored)
newAttributes[this.identifier] = { type: DataTypes.INTEGER }
Utils._.extend(this.source.attributes, this.source.QueryGenerator.attributesToSQL(newAttributes))
Utils._.extend(this.source.rawAttributes, newAttributes)
return this
}
......
......@@ -55,7 +55,7 @@ module.exports = (function() {
} else {
var newAttributes = {}
newAttributes[this.identifier] = { type: DataTypes.INTEGER }
Utils._.extend(this.target.attributes, this.source.QueryGenerator.attributesToSQL(newAttributes))
Utils._.extend(this.target.rawAttributes, newAttributes)
}
return this
......
......@@ -27,7 +27,7 @@ module.exports = (function() {
this.identifier = this.options.foreignKey || Utils._.underscoredIf(Utils.singularize(this.source.tableName) + "Id", this.options.underscored)
newAttributes[this.identifier] = { type: DataTypes.INTEGER }
Utils._.extend(this.target.attributes, this.source.QueryGenerator.attributesToSQL(newAttributes))
Utils._.extend(this.target.rawAttributes, newAttributes)
return this
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!