``` override fun modify(item: User): CompletionSta...
# ktor
p
Copy code
override fun modify(item: User): CompletionStage<User> {
    return supplyAsync {
        transaction {
            Users.update({ Users.id eq item.id }) {
                it[name] = item.name
                it[gender] = item.gender
                it[first_name] = item.firstName;
            }
        }
    }.thenApply { return@thenApply item }
}
Is there a way to simplify an update transaction on object properties, i feel it is repetitive to keep on writing : it[name] = item.name it[gender] = item.gender ?
s
Assuming you are using Exposed, you should probably ask this in the #exposed channel
p
Alright... Thanks.