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

Footprints should add interface about using transaction when ORM is supported #254

Open
jaumard opened this issue Nov 13, 2016 · 1 comment

Comments

@jaumard
Copy link
Contributor

jaumard commented Nov 13, 2016

Issue Description

Footprints should add interface about using transaction when ORM is supported.
It can be nice to have something like this in order to use transaction with footprints. For example if I do :

return this.app.services.FootprintService.create('user', userInfos).then(user => {
      return this.app.services.FootprintService.createAssociation('user', user.id, 'passports', {
        protocol: 'local',
        password: password
      }).then(passport => Promise.resolve(user))
    })

User get created even if association failed so for now my only solution is to manually destroy the user if something go wrong...

It will be nice to have this for the V2 ^^

Environment

  • node version: all
  • trails version: all
  • operating system: all
@jaumard
Copy link
Contributor Author

jaumard commented Jan 19, 2017

V2 is out so maybe possible for v3 ? cc @tjwebb

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