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

Commit dc4ddf7b by David Rivera

sequelize import can now accept a function as the definition

1 parent 8b92d1dc
Showing with 1 additions and 1 deletions
...@@ -216,7 +216,7 @@ module.exports = (function() { ...@@ -216,7 +216,7 @@ module.exports = (function() {
Sequelize.prototype.import = function(path) { Sequelize.prototype.import = function(path) {
if (!this.importCache[path]) { if (!this.importCache[path]) {
var defineCall = require(path) var defineCall = (arguments.length > 1 ? arguments[1] : require(path))
this.importCache[path] = defineCall(this, DataTypes) this.importCache[path] = defineCall(this, DataTypes)
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!