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

Commit 98becc4f by Bryan Tong

possible fix for manyToMany relationships using indexes

1 parent 60ab9024
Showing with 6 additions and 2 deletions
......@@ -131,10 +131,14 @@ module.exports = (function() {
}
if (typeof this.through.model === 'string') {
this.through.model = this.sequelize.define(this.through.model, {}, _.extend(this.options, {
var defineOptions = _.extend(this.options, {
tableName: this.through.model,
paranoid: false // A paranoid join table does not make sense
}));
});
//we dont want indexes here
delete defineOptions.indexes;
console.log(defineOptions);
this.through.model = this.sequelize.define(this.through.model, {}, defineOptions);
if (this.targetAssociation) {
this.targetAssociation.through.model = this.through.model;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!