Hi. I'm using DSL and I can't insert a new row if ...
# exposed
a
Hi. I'm using DSL and I can't insert a new row if the foreign key is provided by me. Example: My table:
Copy code
object FeedTable : LongIdTable() {
    val userId = reference("user_id", UsersTable.id, ReferenceOption.CASCADE)
    val installationId = reference("installation_id", InstallationsTable.id, ReferenceOption.CASCADE)
    val timestamp = long("timestamp")
}
This is how I'm trying to insert:
Copy code
transaction {
    FeedTable.insert {
        it[userId] = EntityID(feedEventEntity.userId, UsersTable)
        it[installationId] = EntityID(insId, InstallationsTable)
        it[timestamp] = timestamp
    }
}