I am developing a sails.js app with MySQL
. I have a model, for which create and retrieve work without any problems.
Model.findOne({ where: { someAttribute : 'foo' }, function(err, model) {
// some logic
});
works fine, but not
Model.find({ where: { someAttribute : 'foo' }, function(err, model) {
// some logic
});
Model.find(...)
always returns an empty array. I have multiple records on the model which satisfy the where clause condition.