Add version to Hibernate mapping so we get optimistic locking this solves number of parallel calls trying to update/guess and mess with the lesson counter
This commit is contained in:
committed by
René Zubcevic
parent
1a83e2825e
commit
f7b794bf68
@ -54,6 +54,8 @@ public class LessonTracker {
|
||||
private final Set<Assignment> allAssignments = new HashSet<>();
|
||||
@Getter
|
||||
private int numberOfAttempts = 0;
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
private LessonTracker() {
|
||||
//JPA
|
||||
|
@ -0,0 +1 @@
|
||||
ALTER TABLE CONTAINER.LESSON_TRACKER ADD VERSION INTEGER;
|
Reference in New Issue
Block a user