protected function getTransactionManager()
    {
        if (!$this->transactionManager) {
            // PDOConnector providers this
            if ($this->connector instanceof TransactionManager) {
                $this->transactionManager = new NestedTransactionManager($this->connector);
            // Direct database access does not
            } else {
                $this->transactionManager = new NestedTransactionManager(new MySQLTransactionManager($this));
            }
        }
        return $this->transactionManager;
    }