While studying for JPA exam I encountered this text in the enthuware exam, handling transactions and locking:
"Entity relationships for which the locked entity contains the foreign key will also be locked, but not the state of the referenced entities (unless those entities are explicitly locked)."
What does it mean when a relationship is locked but the state of the entity isn't? Does this mean the referenced entity can't be deleted but can be updated?
Rafael de Sousa
posted 2 years ago
Hi Cesar Koot,
I believe it says, when a locked entity A has a collection of entity B, entity A can't add or remove any B(e.g.), but you can change any B state, like B.name or B.email (e.g. ) if B it's not explicitly locked.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads