Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)

前端 未结 17 1883
别跟我提以往
别跟我提以往 2020-12-02 16:36

I have a java project that runs on a webserver. I always hit this exception.

I read some documentation, and found that pessimistic locking (or optimistic, but I read

17条回答
  •  日久生厌
    2020-12-02 17:13

    I was also receiving such an exception, but the problem was in my Entity identifier. I am using UUID and there are some problems in the way Spring works with them. So I just added this line to my entity identifier and it began working:

    @Column(columnDefinition = "BINARY(16)")

    Here you can find a little bit more information.

提交回复
热议问题