// 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
Model.findAll({
raw: true,
//Other parameters
});
Model.findById(1).then(data => {
console.log(data.get({ plain: true }));
});
db.Sensors.findAll({
where: {
nodeid: node.nodeid
},
raw: true,
nest: true,
})