Update of /cvsroot/pymerase/pymerase/pymerase/output/dbAPI
In directory sc8-pr-cvs1:/tmp/cvs-serv29950
Modified Files:
dbAPI.py
Log Message:
Merge in fix for bug 788408 from Luis Rodrigo Gallardo Cruz
Index: dbAPI.py
===================================================================
RCS file: /cvsroot/pymerase/pymerase/pymerase/output/dbAPI/dbAPI.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** dbAPI.py 18 Dec 2003 00:49:57 -0000 1.29
--- dbAPI.py 18 Dec 2003 01:01:26 -0000 1.30
***************
*** 455,459 ****
self.appended_objects.append(object)
! def commit(self):
"""Commits changes made to linked objects
"""
--- 455,459 ----
self.appended_objects.append(object)
! def commit(self, visited):
"""Commits changes made to linked objects
"""
***************
*** 468,472 ****
for object in self.loaded_objects:
! object.commit()
def getPrimaryKeys(self):
--- 468,472 ----
for object in self.loaded_objects:
! object.commit(visited)
def getPrimaryKeys(self):
***************
*** 614,618 ****
for object in self.loaded_objects:
! object.commit()
def getPrimaryKeys(self):
--- 614,618 ----
for object in self.loaded_objects:
! object.commit(visited)
def getPrimaryKeys(self):
***************
*** 849,856 ****
field.modified = 0
! def commit(self, visited={}):
"""Attempt to write object hierarchy back to the database
"""
# Begin transaction
if visited.has_key(self):
return
--- 849,859 ----
field.modified = 0
! def commit(self, visited=None):
"""Attempt to write object hierarchy back to the database
"""
# Begin transaction
+ if visited == None:
+ visited = {}
+
if visited.has_key(self):
return
***************
*** 867,871 ****
for link in local_links:
# update the one-to-one objects
! link.commit()
# update the local keys with values from the linked to objects
link.updateLinks()
--- 870,874 ----
for link in local_links:
# update the one-to-one objects
! link.commit(visited)
# update the local keys with values from the linked to objects
link.updateLinks()
***************
*** 885,889 ****
link.updateLinks()
# commit the many-to-one objects
! link.commit()
except Exception, e:
--- 888,892 ----
link.updateLinks()
# commit the many-to-one objects
! link.commit(visited)
except Exception, e:
|