Open jrf0110 opened 10 years ago
dirac.tx( function( tx ){ tx.dals.users.create({ name: 'Tom' , profession: 'Beasting and Feasting' }); tx.savepoint('user_created'); tx.dals.user_hobbies.insert([ { name: 'Skiiing', category: 7 } , { name: 'Polo', category: 22 } ]); tx.savepoint('hobbies_created'); /* ... */ tx.rollback('user_created'); tx.abort(); tx.commit(); }, function( error ){ /* ... */ });