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

If returning a Promise from from a sub transaction, parent transaction will abort #71

Closed
dfahlander opened this issue Mar 13, 2015 · 0 comments

Comments

@dfahlander
Copy link
Collaborator

If returning a Promise from from a sub transaction, parent transaction will abort in the middle of it's operations as examplified below:

db.transaction('rw', db.someTable, function (){
    db.someTable.get(1).then(function(x){
        db.someTable.get(1).then(function(x){
        }).catch(function (err) {
            // Will come here because the sub transaction below returns a promise.
        });
    });
    db.transaction ('rw', db.someTable, function () {
        return db.someTable.get(1);
    };
});
dfahlander added a commit that referenced this issue Mar 13, 2015
Issue #71
Issue #72
Issue #73
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