Exposed
 

Entity definition

Last modified: 03 March 2025

An Entity in Exposed maps a database table record to a Kotlin object. This ensures type safety and allows you to work with database records just like regular Kotlin objects, taking full advantage of Kotlin's language features.

When you use the Data Access Object (DAO) approach, the IdTable needs to be associated with an Entity. This is because every database record in this table needs to be mapped to an Entity instance, identified by its primary key.