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

Commit be653528 by Jan Aagaard Meier

Merge pull request #3792 from Luke265/master

Bug fix: #3266 - belongsToMany junction table timestamp

Conflicts:
	lib/associations/mixin.js
2 parents 5357f6d2 e345774c
Showing with 2 additions and 1 deletions
......@@ -291,8 +291,9 @@ Mixin.belongsToMany = function(targetModel, options) { // testhint options:none
options = options || {};
options.hooks = options.hooks === undefined ? false : Boolean(options.hooks);
options.useHooks = options.hooks;
options.timestamps = options.timestamps === undefined ? this.sequelize.options.timestamps : options.timestamps;
options = _.extend(options, _.omit(sourceModel.options, ['hooks']));
options = _.extend(options, _.omit(sourceModel.options, ['hooks', 'timestamps']));
// the id is in the foreign table or in a connecting table
var association = new BelongsToMany(sourceModel, targetModel, options);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!