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

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