public function addCommand($command, $action, $object = null, $isGraph = false, $data = array())
    {
        if (!$this->_activeTransaction) {
            throw new TransactionManagerException("There is no active transaction.");
        }

        $id = $this->random();
        $this->_commands[$id] = array('command' => $command, 'action' => $action, 'object' => $object, 'isGraph' => $isGraph, 'data' => $data);

        return $id;
    }