trails
trails copied to clipboard
Footprints should add interface about using transaction when ORM is supported
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
V2 is out so maybe possible for v3 ? cc @tjwebb