varchar("name", length = 100) } class Team(id: EntityID<Long>): LongEntity(id) { companion object: LongEntityClass<Team>(Teams) var name by Teams.name } fun main(args: Array<String>) { Database.connect("jdbc:h2:mem:test", "org.h2.Driver") transaction { SchemaUtils.create(Teams) Team.new { name = "Kotlin" } Team.all().forEach { team: Team -> println("id=${team.id}, name=${team.name}") } } }