Reputation: 85
Currently I have next relation in DB parent:
@Entity
class Parent{
@OneToMany
private List<Child> childs;
}
and child
@Entity
class Child{
@ManyToOne
private Parent parent;
}
In case where two users at the same time will work on the one child element from the same list and save it in the same time. Will we have some problem with concurrency?
Upvotes: 1
Views: 45
Reputation: 1895
You need to use Isolation Level ON your methods for entities.
@Transactional(isolation = Isolation.READ_COMMITTED)
For reading and understanding of Isolationlevels:
Upvotes: 1