Back to Exposed

findById

docs/api/exposed-dao/org.jetbrains.exposed.v1.dao/-entity-class/find-by-id.html

1.2.01.0 KB
Original Source

findById

fun findById(id: ID): T?

Gets an Entity by its id value.

Return

The entity that has this id value, or null if no entity was found.

Parameters

id

The id value of the entity.


open fun findById(id: EntityID<ID>): T?

Gets an Entity by its EntityID value.

Return

The entity that has this wrapped id value, or null if no entity was found.

Parameters

id

The EntityID value of the entity.

Samples

org.jetbrains.exposed.v1.tests.shared.entities.EntityCacheNotUpdatedOnCommitIssue1380.testRegression

Generated by Dokka © 2026 Copyright