diff -ur db/models/base.py /sw/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/models/base.py
--- db/models/base.py	2006-06-15 17:46:52.000000000 -0700
+++ /sw/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/models/base.py	2006-06-16 16:24:12.000000000 -0700
@@ -195,7 +195,7 @@
                      backend.get_pk_default_value()))
             if self._meta.has_auto_field and not pk_set:
                 setattr(self, self._meta.pk.attname, backend.get_last_insert_id(cursor, self._meta.db_table, self._meta.pk.column))
-        transaction.commit_unless_managed()
+        transaction.commit_unless_managed(connection=self._meta.connection)
 
         # Run any post-save hooks.
         dispatcher.send(signal=signals.post_save, sender=self.__class__, instance=self)
@@ -377,7 +377,7 @@
             backend.quote_name(rel_field.m2m_column_name()),
             backend.quote_name(rel_field.m2m_reverse_name()))
         cursor.executemany(sql, [(this_id, i) for i in id_list])
-        transaction.commit_unless_managed()
+        transaction.commit_unless_managed(connection=self._meta.connection)
 
 ############################################
 # HELPER FUNCTIONS (CURRIED MODEL METHODS) #
@@ -398,7 +398,7 @@
         backend.quote_name(ordered_obj.pk.column))
     rel_val = getattr(self, ordered_obj.order_with_respect_to.rel.field_name)
     cursor.executemany(sql, [(i, rel_val, j) for i, j in enumerate(id_list)])
-    transaction.commit_unless_managed()
+    transaction.commit_unless_managed(connection=self._meta.connection)
 
 def method_get_order(ordered_obj, self):
     connection_info = ordered_obj.connection_info
diff -ur db/transaction.py /sw/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/transaction.py
--- db/transaction.py	2006-06-13 13:11:13.000000000 -0700
+++ /sw/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/db/transaction.py	2006-06-16 16:23:28.000000000 -0700
@@ -111,7 +111,7 @@
             return state[thread_ident][-1]
     return settings.TRANSACTIONS_MANAGED
 
-def managed(flag=True):
+def managed(connection=connection,flag=True):
     """
     Puts the transaction manager into a manual state: managed transactions have
     to be committed explicitely by the user. If you switch off transaction
@@ -128,7 +128,7 @@
     else:
         raise TransactionManagementError("This code isn't under transaction management")
 
-def commit_unless_managed():
+def commit_unless_managed(connection=connection):
     """
     Commits changes if the system is not in managed transaction mode.
     """
@@ -137,7 +137,7 @@
     else:
         set_dirty()
 
-def rollback_unless_managed():
+def rollback_unless_managed(connection=connection):
     """
     Rolls back changes if the system is not in managed transaction mode.
     """
@@ -146,14 +146,14 @@
     else:
         set_dirty()
 
-def commit():
+def commit(connection=connection):
     """
     Does the commit itself and resets the dirty flag.
     """
     connection._commit()
     set_clean()
 
-def rollback():
+def rollback(connection=connection):
     """
     This function does the rollback itself and resets the dirty flag.
     """
