Sequelize findAll with Not Null
I try to get all active users that in the deleted_at column is empty.
Model.findAll({
raw: true,
where: {
user_id: user_id,
status: true,
deleted_at: {
$ne: null
}
},
attributes: ['name']
}).map(el => el.get('name'));
This always return empty value, in my database i have one row with deleted_at: null.
What's the correct way of do this ?
from Recent Questions - Stack Overflow https://ift.tt/3cvlIH7
https://ift.tt/eA8V8J
Comments
Post a Comment