sdepold/sequelize — Issue #126: SELECT Never Returns...
Author: bfoust
Created: 2012-02-01 16:31:48+00:00
State: open

findAll() never calls "success()"

I see the logger print out:

SELECT * FROM task

But it neither success(), nor failure() is ever called.

(3) Task.findAll().success(function(tasks) {
// never gets here...
}).failure(function (err) {
// or here...
res.send('Error: ' + err);
});

---- Setup ---

(1) Open the DB

var Sequelize = require('sequelize'); // mysql by default
var sequelize = new Sequelize('myDbName', 'root', 'mypassword', {
host: "127.0.0.0",
port: 3306
});

(2) Define the model

var Task = sequelize.define('task', {
task_id: Sequelize.INTEGER,
task_name: Sequelize.TEXT,
},
{
underscored: true,
freezeTableName: true
}
);