Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction rollbacks #15

Open
phizab opened this issue Nov 8, 2013 · 0 comments
Open

Transaction rollbacks #15

phizab opened this issue Nov 8, 2013 · 0 comments

Comments

@phizab
Copy link

phizab commented Nov 8, 2013

Is there a reason why there are no rollbacks in the module? At every transaction is only a commit, but as I know we need a rollback in case of an error. The commit should be wrapped with a try .. catch statement as follows:

$this->_getIndexAdapter()->beginTransaction();

[..]

try {
    $this->_getIndexAdapter()->commit();
} catch (Exception $e) {
    $this->_getIndexAdapter()->rollback();
}

Or am I wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant