/**
     * Begin transaction
     *
     * Begins an transaction, make sure you'll call commit or rollback when done,
     * otherwise work will be lost.
     */
    public function beginTransaction()
    {
        $this->persistenceHandler->beginTransaction();

        ++$this->transactionDepth;
        $this->commitEventsQueue[++$this->transactionCount] = array();
    }