• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Locking on referenced entities

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!