Skip to content

sequelize (and probably other adapters) not working anymore #74

Closed
SirUli opened this Issue Apr 18, 2012 · 4 comments

3 participants

@SirUli
SirUli commented Apr 18, 2012

Hello,

sequelize currently (version": "1.3.7") doesn't provide a "initialize" function, which leads to the following error:

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
TypeError: Object function (database, username, password, options) {
    this.options = Utils._.extend({
      dialect: 'mysql',
      host: 'localhost',
      port: 3306,
      define: {},
      query: {},
      sync: {}
    }, options || {})

    this.config = {
      database: database,
      username: username,
      password: (( (["", null, false].indexOf(password) > -1) || (typeof password == 'undefined')) ? null : password),
      host    : this.options.host,
      port    : this.options.port
    }

    var ConnectorManager = require("./dialects/" + this.options.dialect + "/connector-manager")

    this.daoFactoryManager     = new DAOFactoryManager(this)
    this.connectorManager = new ConnectorManager(this, this.config)
  } has no method 'initialize'
    at new Schema (MYDEVDIR\node_modules\jugglingdb\lib\schema.js:72:13)
    at Object.<anonymous> (MYDEVDIR\node_modules\jugglingdb\lib\railway.js:21:14)
    at Module._compile (module.js:441:26)
    at Object..js (module.js:459:10)
    at Module.load (module.js:348:31)
    at Function._load (module.js:308:12)
    at Module.require (module.js:354:17)
    at require (module.js:370:17)
    at Object.init (MYDEVDIR\node_modules\jugglingdb\index.js:11:5)
    at MYDEVDIR\node_modules\railway\lib\extensions.js:38:17

My first workaround was to write an adapter for jugglingdb, but i think this is not really what was intended in the example on the website.

The rootcause is to be found in "lib/schema.js" where "adapter.initialize" is called. As this initialization should be done in the custom schema (as this is a custom adapter), i'm a little confused there?

Does this simply not work anymore with sequelize?

Best Regards,
Uli

@SirUli
SirUli commented Aug 21, 2012

Any news on this one?

@anatoliychakkaev
Collaborator
@SirUli
SirUli commented Aug 21, 2012

My proposal is to change the examples on the main page then as these show sequelize as an option. Still the customSchema is not working if there is no initialize method available in the required adapter. From my perspective this does not really make sense?

@1602
Owner
1602 commented Aug 21, 2012
@1602 1602 closed this Jan 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.