Back to Exposed

reload

docs/api/exposed-dao/org.jetbrains.exposed.v1.dao/-entity-class/reload.html

1.2.0765 B
Original Source

reload

fun reload(entity: Entity<ID>, flush: Boolean = false): T?

Reloads the fields of an entity from the database and returns the entity as a new object.

The original entity will also be removed from the current cache.

Parameters

flush

Whether pending entity changes should be flushed prior to reloading.

See also

removeFromCache

Samples

org.jetbrains.exposed.v1.tests.shared.entities.EntityTests.testThatUpdateOfInsertedEntitiesGoesBeforeAnInsert

Generated by Dokka © 2026 Copyright