---
title: "How to Ignore Entity Changes"
url: "https://docs.ravendb.net/6.2/client-api/session/how-to/ignore-entity-changes"
version: "6.2"
language: "python"
---

# How to Ignore Entity Changes

> Client language: Python. Also available for [C#](https://docs.ravendb.net/6.2/client-api/session/how-to/ignore-entity-changes.md), [Java](https://docs.ravendb.net/6.2/client-api/session/how-to/ignore-entity-changes.java.md), [PHP](https://docs.ravendb.net/6.2/client-api/session/how-to/ignore-entity-changes.php.md), [Node.js](https://docs.ravendb.net/6.2/client-api/session/how-to/ignore-entity-changes.nodejs.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

To indicate that an entity should be ignored when tracking changes,
use the `advanced` session `ignore_changes_for` method.

Using `load` again to retrieve this entity will not initiate a server call.

The entity will still take part in the session, but be ignored when `save_changes` is called.

See more here: [Disable Entity Tracking](https://docs.ravendb.net/6.2/client-api/session/configuration/how-to-disable-tracking.python.md)

## Syntax

```python
def ignore_changes_for(self, entity: object) -> None: ...
```

| Parameter | Type | Description |
| - | - | - |
| **entity** | `object` | The instance of an entity for which changes will be ignored. |

## Example

```python
product = session.load("products/1-A", Product)
session.ignore_changes_for(product)
product.units_in_stock += 1  # this will be ignored for save_changes
session.save_changes()
```

## See also

- [What is a Session and How Does it Work](https://docs.ravendb.net/6.2/client-api/session/what-is-a-session-and-how-does-it-work.python.md)
- [How to Check if Entity has Changed](https://docs.ravendb.net/6.2/client-api/session/how-to/check-if-entity-has-changed.python.md)
- [How to Check if There are Any Changes on a Session](https://docs.ravendb.net/6.2/client-api/session/how-to/check-if-there-are-any-changes-on-a-session.python.md)
- [Evict Entity From a Session](https://docs.ravendb.net/6.2/client-api/session/how-to/evict-entity-from-a-session.python.md)
- [Refresh Entity](https://docs.ravendb.net/6.2/client-api/session/how-to/refresh-entity.python.md)
