# ORMFlushAll()

Flushes all open ORM sessions across all datasources. All pending CRUD operations in every active ORM session are saved to the database.

**Requires Extension:** [Hibernate ORM Engine Extension](https://download.lucee.org/#FAD1E8CB-4F45-4184-86359145767C29DE)

```
ORMFlushAll( );
```

**Returns:** void

*This function does not take any arguments.*

# Usage Notes

Equivalent to calling [ORMFlush()](ormflush.md) for each active datasource session.

Useful when your application uses multiple ORM datasources and you want to flush all pending changes in one call.

Like [ORMFlush()](ormflush.md), prefer using `transaction` blocks over manual flush calls — calling `ORMFlushAll()` outside a transaction means each statement auto-commits individually with no rollback on failure.

See [ORM - Sessions and Transactions](../../recipes/orm-session-and-transactions.md) for multi-datasource details.

# Examples

```cfml
// Save entities to different datasources, then flush all at once
entitySave( entityNew( "Auto", { id: createUUID(), make: "Toyota" } ) );
entitySave( entityNew( "Dealership", { id: createUUID(), name: "City Motors" } ) );
ORMFlushAll();
```







# Categories

[ORM](../../categories/orm.md)