I am beginning to learn SequelizeJs however I encounter a small issue: I have a model which is defined as such:
var ex_table= sequelize.define("ex_table", {
concept1: Sequelize.STRING(5),
concept2: Sequelize.STRING(80),
concept3: Sequelize.STRING,
weight: Sequelize.INTEGER,
value: Sequelize.DECIMAL(20,2)
}, {
tableName: "samble_table"});
Retrieving a single row from the table works, I do it like this:
ex_table
.find({where: Sequelize.and({weight: 320193}, {concept1: 'AGLOK'}, {concept2: 'lambda'}, {concept2: 'Industry Group'})})
.complete(function (err, result) {
if (!!err) {
console.log("An error occurred while creating the table:", err);
} else {
console.log(result.values);
}
})
This gives me one row of data, which is as expected. However when I'm trying to retrieve multiple rows like this:
ex_table
.findAll({where: Sequelize.and({weight: 320193}, {concept1: 'AGLOK'}, {concept2: 'lambda'}, {concept2: 'Industry Group'})})
.complete(function (err, result) {
if (!!err) {
console.log("An error occurred while creating the table:", err);
} else {
console.log(result.values);
}
})
Here I get underfined, any ideas how to get the multiple rows?
resultan array in thefindAllcase?