In JPA. When we do Optimistic Locking or Pessimistic Locking. Is this only the particular row in the table is locked or the entire table is locked?
If the entity/table/row is locked, do all the related entity/table/row is locked or not?
Related entity/table/row here references to the other tables involved in the relation i.e If there are two tables Person and Address, and person has address related to it. With both the address and Person will be locked or not?