Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

SirUli opened this issue Apr 18, 2012 · 4 comments

Comments

@SirUli
Copy link

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
Copy link
Author

SirUli commented Aug 21, 2012

Any news on this one?

@anatoliychakkaev
Copy link
Collaborator

sequelize is no longer supported. use mysql instead. all other adapters
working fine.

On Tue, Aug 21, 2012 at 10:01 PM, SirUli notifications@github.com wrote:

Any news on this one?


Reply to this email directly or view it on GitHubhttps://github.com//issues/74#issuecomment-7910066.

@SirUli
Copy link
Author

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
Copy link
Owner

1602 commented Aug 21, 2012

Wow. Thanks for spotting! Docs updated.

On Tue, Aug 21, 2012 at 10:05 PM, SirUli notifications@github.com wrote:

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?


Reply to this email directly or view it on GitHubhttps://github.com//issues/74#issuecomment-7910218.

Thanks,
Anatoliy Chakkaev

@1602 1602 closed this as completed Jan 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants