Skip to content

InsertOrUpdate usage #544

Closed Answered by MaaxGr
lUNuXl asked this question in Q&A
Discussion options

You must be logged in to vote

You have to specify what columns should be updated in case of an already existing row:

database.insertOrUpdate(BuhaKontostaendeInfoTable) {
    set(it.buhaKontostaendeInfoDatum, date.toJavaLocalDate())
    set(it.buhaKontostaendeInfoText, text)
    onDuplicateKey {
        set(it.buhaKontostaendeInfoText, text)
    }
}

Does that help?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lUNuXl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants