public function setIsolationLevel($level)
    {
        if (!$this->getIsActive()) {
            throw new Exception('Failed to set isolation level: transaction was inactive.');
        }
        Log::debug('Setting transaction isolation level to ' . $level . __METHOD__);
        $this->db->getSchema()->setTransactionIsolationLevel($level);
    }