delete

abstract fun delete(): Int(source)

Delete this entity in the database and return the affected record number.

Similar to flushChanges, we need to note that:

  1. The function requires a primary key specified in the table object via Table.primaryKey, otherwise, Ktorm doesn't know how to identify entity objects.

  2. The entity object calling this function must be ATTACHED to the database first.

See also