Entity
A row of EntityClass.table, with the columns it should expose declared as delegated properties.
Subclass one of the typed variants — IntEntity, LongEntity, UuidEntity, CompositeEntity — and give the class a companion object of the matching EntityClass:
class Film(id: EntityID<Int>) : IntEntity(id) {
var title by Films.title
var director by Director referencedOn Films.director
companion object : IntEntityClass<Film>(Films)
}A write to such a property is held in writeValues until the entity is flushed — by flush, by the next statement in the transaction that touches the same table, or by the commit.
Parameters
The unique stored identity value for the mapped record.
Inheritors
Properties
The associated EntityClass that manages this Entity instance.
The final column-value mapping for this Entity instance after being flushed and retrieved from the database.
The initial column-value mapping for this Entity instance before being flushed and inserted into the database.
Functions
Sends all cached inserts and updates for this Entity instance to the database.
Transfers initial column-value mappings from writeValues to readValues and clears the former once complete.
Registers a reference as a field of the child entity class, which returns a parent object of this EntityClass, for use in many-to-many relations.