showing results for - "unhandled rejection typeerror 3a article findbyid is not a function sequelize"
Vincenzo
07 Jul 2020
1/* With Sequelize v5, findById() was replaced by findByPk(). 
2Replace findById using findByPk and everything should work fine. */
3
4// ex: search for known ids
5Project.findByPk(123).then(project => {
6  // project will be an instance of Project and stores the content of the table entry
7  // with id 123. if such an entry is not defined you will get null
8})