> ## Documentation Index
> Fetch the complete documentation index at: https://loadwise.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# typeorm-load-then-save

> A TypeORM entity is loaded only to change a few fields and save it back.

## What it flags

A repository entity is loaded only to change a few fields and then `save()`d, costing a SELECT, an UPDATE and a transaction.

## How to review or fix

Use `update()` or `increment()`; entity listeners and subscribers for update will not run.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "typeorm-load-then-save": "off" }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.