jwood / tenacity

A database client independent way of managing relationships between models backed by different databases.
MIT License
118 stars 17 forks source link

Add code to rollback changes on failure #25

Open jwood opened 13 years ago

jwood commented 13 years ago

Since we do not have transactions to help us, we need to manually ensure that the objects in their respective database are not left in a corrupt state if, for some reason, we are unable to create or destroy a relationship. Add logic to validate, as much as possible, the objects before saving them. Also, create code to rollback a "transaction" if one of the operations fail.