When trying to acquire a lock to entity using entityManager.lock(entity), it locks only that entity without locking its associated onetomany entities. I have also tried sett