Closed
Description
Now it is not possible to create a one-to-one relationship with the execute statement, as if you do like this (see below), the flatMap won't be invoked.
databaseClient.execute("INSERT INTO table_a (something) VALUES (:something)")
.bind("something", "id")
.fetch().first()
.flatMap {
databaseClient.execute("INSERT INTO table_b (something, table_a_id) VALUES (:something, :table_a_id)")
.bind("something", entry.parameters)
.bind("table_a_id", it["id"].toString().toLong())
.fetch().rowsUpdated()
}
.then()
Possible solutions (@mp911de):
We could either accept a Statement customizer or expose returnGeneratedKeys(…).