# flush

open fun flush(batch: EntityBatchUpdate? = null): Boolean

Sends all cached inserts and updates for this Entity instance to the database.

#### Return

`false` if no cached inserts or updates were sent to the database; `true`, otherwise.

#### Parameters

batch

The EntityBatchUpdate instance that should be used to perform a batch update operation for multiple entities. If left `null`, a single update operation will be executed for this entity only.

#### Samples

org.jetbrains.exposed.v1.tests.shared.entities.EntityHookTest.testCallingFlushNotifiesEntityHookSubscribers