Answers for "sequelize find query to fetch specific columns"

0

sequelize find query to fetch specific columns

Model.findAll({
	where: { RoleId: 2 },
  	attributes: { include: ['Name', 'Age'] }
});

Model.findAll({
  	where: { RoleId: 2 },
  	attributes: { exclude: ['Gender'] }
});
Posted by: Guest on April-22-2022

Browse Popular Code Answers by Language