A simpler question - is there any reason *not* to include this code in 
my model's save() method?

try:
    Model.save(self)
except DatabaseError:
    transaction.rollback_unless_managed()
    raise


The benefits:
- automatic recovery from failed unmanaged transactions - very handy 
when working in the shell, or when performing multiple updates that 
don't have to succeed or fail as a group
- no effect when inside an explicit (managed) transaction

Thanks,
Kent

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to