TransactionManagerBase::$rootId
Same name in other branches
- 10 core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php \Drupal\Core\Database\Transaction\TransactionManagerBase::rootId
The ID of the root Transaction object.
The unique identifier of the first 'root' transaction object created, when the stack is empty.
Normally, during the transaction stack lifecycle only one 'root' Transaction object is processed. Any post transaction callbacks are only processed during its destruction. However, there are cases when there could be multiple 'root' transaction objects in the stack. For example: a 'root' transaction object is opened, then a DDL statement is executed in a database that does not support transactional DDL, and because of that, another 'root' is opened before the original one is closed.
Keeping track of the first 'root' created allows us to process the post transaction callbacks only during its destruction and not during destruction of another one.
Type: rootId
File
-
core/
lib/ Drupal/ Core/ Database/ Transaction/ TransactionManagerBase.php, line 44
Class
- TransactionManagerBase
- The database transaction manager base class.
Namespace
Drupal\Core\Database\TransactionCode
private ?string $rootId = NULL;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.