On Tue, 2008-09-09 at 10:35 +0200, Thomas Guettler wrote: [...] > I use Postgres supports nested transaction by using savepoints. > > Unfortunately I can't get it working: I try to use savepoints, but they > get lost > as soon is the commit_on_success decorator sends COMMIT.
That's how savepoints work, yes. They're not exactly the same as nested transactions, since the transaction overrides everything. Savepoints give you saved points within a transaction, but not more than that. > I guess I need to convert all commit_on_success decorators to > a new commit_on_success_unless_inside_transaction decorator. > > Any idea how to solve this? Write a new database backend that inherits pretty much everything from the postgresql backend, but overrides the _commit and _rollback methods of the BaseDatabaseOperations class. Then use that backend for your tests. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

