diff --git a/docs/querying.md b/docs/querying.md index aaae2c0..40145c5 100644 --- a/docs/querying.md +++ b/docs/querying.md @@ -14,13 +14,13 @@ console.log(foundPug) ``` -## Model.findById +## Model.findByPk [Official Docs](http://docs.sequelizejs.com/manual/tutorial/models-usage.html#-find-search-for-one-specific-element-in-the-database) -Finds the instance with the specified id. +Finds the instance with the specified Primary Key (id). ```javascript -pugWithIdOne = await Pug.findById(1) +pugWithIdOne = await Pug.findByPk(1) console.log(pugWithIdOne) ``` @@ -79,4 +79,4 @@ console.log(sevenYearOldBlackPugs) ``` -**Note**: To specify comparisons like "greater than" and "less than", Check out [Search Operators](/search-operators). \ No newline at end of file +**Note**: To specify comparisons like "greater than" and "less than", Check out [Search Operators](/search-operators).