Suppose we are using a DB with isolation level set to: read_committed
and we are also using JPA Entities annotated with
Optimistic locking works for individual table rows only. In this particular case, the entity C can be updated successfully since the second transaction does not modify C.
If you want to create a conflict here, then you must use either of the following optimistic lock requests:
in the second transaction so that when you update the entity A, you also trigger a version increment in C.
Check out this article for more details.