Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

findone sequelize

const project = await Project.findOne({ where: { title: 'My Title' } });
if (project === null) {
  console.log('Not found!');
} else {
  console.log(project instanceof Project); // true
  console.log(project.title); // 'My Title'
}
Source by sequelize.org #
 
PREVIOUS NEXT
Tagged: #findone #sequelize
ADD COMMENT
Topic
Name
3+2 =