# BaseModel.findByPk() method · @imqueue/pg-sequelize

Source: https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.basemodel.findbypk/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-sequelize 4.2.0 — generated reference, not hand-written

Finds one instance by primary key.

**Signature:**

```typescript
static findByPk<M>(identifier?: Identifier, options?: Omit<FindOptions, 'where'>): Promise<M | null>;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| identifier | Identifier | _(Optional)_ Primary key value to look for. |
| options | Omit<[FindOptions](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.findoptions/), 'where'> | _(Optional)_ Find options, minus `where`, which the key supplies. |


**Returns:**

Promise<M \| null>

The instance, or `null` when no row matches.

## Remarks

Sequelize's own `findByPk` with one addition: on a model declared as a view, the numeric columns of the result are cast back to numbers.

