Skip to content

Commit 7f5417f

Browse files
ericyoondotcommweibel
authored andcommitted
Support table name being different than model key
1 parent 4091963 commit 7f5417f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/connect-session-sequelize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = function SequelizeSessionInit (Store) {
5757
debug('Using table: %s for sessions', this.options.table)
5858
// Get Specifed Table from Sequelize Object
5959
this.sessionModel =
60-
this.options.db[this.options.table] || this.options.db.models[this.options.table]
60+
this.options.db.models[this.options.modelKey] || this.options.db[this.options.table] || this.options.db.models[this.options.table]
6161
} else {
6262
// No Table specified, default to ./model
6363
debug('No table specified, using default table.')

0 commit comments

Comments
 (0)