You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [`findByPk`](pathname:///api/v7/classes/_sequelize_core.index.Model.html#findByPk) method obtains only a single entry from the table, using the provided primary key.
We do not currently have a way to determine which columns are primary keys in TypeScript.
82
+
This means that only runtime checks will ensure that the primary key is passed correctly.
83
+
84
+
:::
85
+
76
86
## `findAndCountAll`
77
87
78
88
The [`findAndCountAll`](pathname:///api/v7/classes/_sequelize_core.index.Model.html#findAndCountAll) method is a convenience method that combines `findAll` and `count`. This is useful when dealing with queries related to pagination where you want to retrieve data with a `limit` and `offset` but also need to know the total number of records that match the query.
0 commit comments