mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #949] Add a default lock mode to the EntityManager #8949
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/949
State: closed
Merged: No
Following this discussion on the mailing list, this proposal introduces a default lock mode for all entities loaded through an EntityManager.
At the moment, there is no way to set a lock mode for the following use cases:
getReference()and then initializedThis proposal introduces the idea of a default lock mode, which can be set at runtime when all reads in a transaction should be locking.
It works this way:
I have successfully tested it with the following use cases:
EntityManager::find()EntityRepository::findBy()Happily waiting for your feedback!