Commit 2f9e78bd authored by Ken Manheimer's avatar Ken Manheimer

Copied over the magic for _setBasesHoldOnToYourButts().

parent 6904ca0b
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
"""Database connection support """Database connection support
$Id: Connection.py,v 1.19 1999/07/20 19:08:50 jim Exp $""" $Id: Connection.py,v 1.20 1999/07/21 21:11:07 klm Exp $"""
__version__='$Revision: 1.19 $'[11:-2] __version__='$Revision: 1.20 $'[11:-2]
from cPickleCache import PickleCache from cPickleCache import PickleCache
from POSException import ConflictError, ExportError from POSException import ConflictError, ExportError
...@@ -469,6 +469,17 @@ class Connection(ExportImport.ExportImport): ...@@ -469,6 +469,17 @@ class Connection(ExportImport.ExportImport):
get_transaction().abort() get_transaction().abort()
self._cache.invalidate(self._invalidated) self._cache.invalidate(self._invalidated)
######################################################################
# Just plain weird. Don't try this at home kids.
def exchange(self, old, new):
oid=old._p_oid
new._p_oid=oid
new._p_jar=self
new._p_changed=1
get_transaction().register(new)
self.cache[oid]=new
class tConnection(Connection): class tConnection(Connection):
def close(self): def close(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment