Hi Can i create dao class (entity) for ordinary ta...
# exposed
e
Hi Can i create dao class (entity) for ordinary table (not IdTable)? Table definition:
Copy code
object EventTable : Table("event") {

    val id: Column<String> = varchar("id", 255)
    val eventType: Column<EventType> = enumerationByName("type", 255, EventType::class)

    val event: Column<Event> = jsonb("event", objectMapper)

    override val primaryKey = PrimaryKey(id, eventType)
}
t
No, DAO layer should know how to find entities in a table. But You could use your string id for this too.
e
it is not a very good solution, because only pair of id and type is unique
t
There is a feature request https://github.com/JetBrains/Exposed/issues/43 . You could track it.