-
Hello, I have a trouble figuring out how insert or update works in this library. I want to create a record with a given id if it doesn't exist or update it with a new data (aka upsert). How do I do this? So far I tried using it like this: val affectedId = database.insertOrUpdateReturning(AuthPasswords, AuthPasswords.playerId) {
set(it.hash, playerAuth.hash)
set(it.salt, playerAuth.salt)
set(it.playerId, playerAuth.playerId)
} but I get this error:
the docs on How do I make ktorm update the already existing record? |
Beta Was this translation helpful? Give feedback.
Answered by
MaaxGr
May 14, 2024
Replies: 1 comment
-
You have to specify what columns should be updated in case of an already existing row:
Does that help? |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lUNuXl
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have to specify what columns should be updated in case of an already existing row:
Does that help?