Back to Exposed

refresh

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

1.2.0745 B
Original Source

refresh

open fun refresh(flush: Boolean = false)

Updates the fields of this Entity instance with values retrieved from the database. Override this function to refresh some additional state, if any.

Parameters

flush

Whether pending entity changes should be flushed prior to updating.

Throws

EntityNotFoundException

If the entity no longer exists in the database.

Samples

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

Generated by Dokka © 2026 Copyright