// Callee is the model definition. This allows you to easily map a query to a predefined model
const projects = await sequelize.query('SELECT * FROM projects', {
model: Projects,
mapToModel: true // pass true here if you have any mapped fields
});
// Each element of `projects` is now an instance of Project
db.Sensors.findAll({
where: {
nodeid: node.nodeid
},
raw: true,
})
db.Sensors.findAll({
where: {
nodeid: node.nodeid
},
raw: true,
nest: true,
})