caminte
caminte copied to clipboard
SQLITE_ERROR: no such column
When use findById() and pass a uuid alphanumeric string, example:
User.findById(6f13eba03b6d11e780d5c59d28f4b039, function(err, user){
// your code here
})
show:
Unhandled rejection Error: SQLITE_ERROR: no such column: "6f13eba03b6d11e780d5c59d28f4b039"
this is my model:
const User = schema.define('user', {
id: { type: schema.String, unique : true },
username: { type: schema.String, limit: 25 },
email: { type: schema.String, limit: 100, unique : true },
password: { type: schema.String },
role: { type: schema.String }
}, {
primaryKeys: ["id"]
});
This works fine but only allows integer, non-alphanumeric characters I have also tested with the mysql adapter and the same thing happens