As a developer I want to add optimistic versioning to TaskAssignment so that two concurrent updates to the same assignment can't silently overwrite each other.
Assumptions & Constraints
- Uses the standard JPA
version field.
- This is purely a concurrency safeguard, it doesn't change any business rule or existing field.
Preconditions
TaskAssignment entity and its migration already exist.
Business rules
- Every update to a
TaskAssignment row increments its version.
- An update based on a stale version is rejected, not silently applied.
- Creating a new
TaskAssignment starts at the initial version, no special handling needed there.
Acceptance Criteria
task_assignments has a version column, not null, defaulting to 0.
- The entity has a
version field mapped to that column.
- Updating a
TaskAssignment with a stale version results in a clear exception.
- A normal, non concurrent update still works exactly as before.
Out of scope
- Any UI handling for a version conflict.
- Adding versioning to any entity other than
TaskAssignment.
Epic link
Epic #385 - EPIC: Tasks linkage to tours
Tasks
As a developer I want to add optimistic versioning to
TaskAssignmentso that two concurrent updates to the same assignment can't silently overwrite each other.Assumptions & Constraints
versionfield.Preconditions
TaskAssignmententity and its migration already exist.Business rules
TaskAssignmentrow increments its version.TaskAssignmentstarts at the initial version, no special handling needed there.Acceptance Criteria
task_assignmentshas aversioncolumn, not null, defaulting to 0.versionfield mapped to that column.TaskAssignmentwith a stale version results in a clear exception.Out of scope
TaskAssignment.Epic link
Epic #385 - EPIC: Tasks linkage to tours
Tasks
versioncolumn migration fortask_assignments.versionfield toTaskAssignment.