Repository navigation
SQLite fails when trying to find with a boolean field #292
Copy link
Copy link
Closed
Description
I have a model with a boolean field running on an SQLite3 database.
If I try to use find like this:
db.models.endpoint.find({active: true}, function(err, endpoints) {
if (err) {
console.log(err);
done.abort();
}
console.log(endpoints);
done(endpoints);
});
I get the error:
{ [Error: SQLITE_ERROR: no such column: true] errno: 1, code: 'SQLITE_ERROR' }
However, if I call find with an integer instead
db.models.endpoint.find({active: 1}, function(err, endpoints) {
if (err) {
console.log(err);
done.abort();
}
console.log(endpoints);
done(endpoints);
});
I get the results that I am expecting.
Node 0.10.9
sqlite3 2.1.14
orm 2.1.0
Reactions are currently unavailable
Activity
dresende commentedon Aug 20, 2013
Try with sqlite3
2.1.7. We have issues from that version forward that are not resolved yet.sql-query@0.1.10 (#292)
dresende commentedon Aug 20, 2013
Please try the latest commit, don't forget to update dependencies.
dresende commentedon Aug 26, 2013
This should be fixed, reopen otherwise.