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

Commit ff76b8c6 by sdepold
2 parents adf9836f 8de8ef6e
...@@ -51,7 +51,9 @@ module.exports = (function() { ...@@ -51,7 +51,9 @@ module.exports = (function() {
this.connectorDAO = this.source.daoFactoryManager.sequelize.define(this.combinedName, combinedTableAttributes, this.options) this.connectorDAO = this.source.daoFactoryManager.sequelize.define(this.combinedName, combinedTableAttributes, this.options)
if(!this.isSelfAssociation) this.target.associations[this.associationAccessor].connectorDAO = this.connectorDAO if(!this.isSelfAssociation) this.target.associations[this.associationAccessor].connectorDAO = this.connectorDAO
this.connectorDAO.sync() if(this.options.syncOnAssociation) {
this.connectorDAO.sync()
}
} else { } else {
var newAttributes = {} var newAttributes = {}
newAttributes[this.identifier] = { type: DataTypes.INTEGER } newAttributes[this.identifier] = { type: DataTypes.INTEGER }
......
...@@ -13,6 +13,7 @@ module.exports = (function() { ...@@ -13,6 +13,7 @@ module.exports = (function() {
validate: {}, validate: {},
freezeTableName: false, freezeTableName: false,
underscored: false, underscored: false,
syncOnAssociation: true,
paranoid: false paranoid: false
}, options || {}) }, options || {})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!