Hi all I have created an entity: ```class Gender(i...
# exposed
Hi all I have created an entity:
Copy code
class Gender(id: EntityID<String>) : Entity<String>(id) {
    companion object : EntityClass<String, Gender>(Genders)
    var description by Genders.description
and a new entity without
Copy code
val g = Gender.new("M") {
        description = "Male"
because I only need an instance of
I tried to compile the code above but it shows:
Copy code
Exception in thread "main" java.lang.IllegalStateException: No transaction in context.
	at org.jetbrains.exposed.sql.transactions.TransactionManager$Companion.current(TransactionApi.kt:98)
	at org.jetbrains.exposed.dao.EntityClass.new(EntityClass.kt:237)
	at io.databaker.MainKt.main(Main.kt:116)