I have a strange issue with this simple update statement in anorm. This update sometimes occurs and sometimes does not. I’ve also tried SET num_not_correct = num_not_correct + 1
and found that the increment sometimes occurs and sometimes does not.
I’ve tried adding println
statements, and confirmed that the function runs, and as far as I can see, always returns 1.
def updateQuizAfterInsert(quizId: Long, numWords: Int)(
implicit conn: Connection): Int =
SQL("""
UPDATE individual_quiz_props SET num_not_correct = {numWords}, round = 1
WHERE quiz_id = {quizId};
""").on("quizId" -> quizId, "numWords" -> numWords).executeUpdate()
I wish to ask if there is anything else I should investigate.