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

Commit 27fdaff2 by Jan Aagaard Meier

Don't delete the pk of join table model

1 parent fc27da44
Showing with 0 additions and 4 deletions
......@@ -71,10 +71,6 @@ module.exports = (function() {
if (this.hasJoinTableModel === true) {
this.connectorDAO = this.options.joinTableModel
this.connectorDAO.rawAttributes = Utils._.merge(this.connectorDAO.rawAttributes, combinedTableAttributes)
// FIXME - Should we do this? Normally join tables does not have an id, and it is not needed,
// but users might wonder what hapened if they defined the ID themselves
delete this.connectorDAO.rawAttributes.id
this.connectorDAO.init(this.connectorDAO.daoFactoryManager)
} else {
this.connectorDAO = this.source.daoFactoryManager.sequelize.define(this.combinedName, combinedTableAttributes, this.options)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!