[SQL-CVS] r855 - trunk/SQLObject/sqlobject/inheritance
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2005-07-27 16:22:21
|
Author: phd Date: 2005-07-27 14:55:30 +0000 (Wed, 27 Jul 2005) New Revision: 855 Modified: trunk/SQLObject/sqlobject/inheritance/__init__.py Log: Fixed a bug - pass connection to all calls. Modified: trunk/SQLObject/sqlobject/inheritance/__init__.py =================================================================== --- trunk/SQLObject/sqlobject/inheritance/__init__.py 2005-07-27 10:45:40 UTC (rev 854) +++ trunk/SQLObject/sqlobject/inheritance/__init__.py 2005-07-27 14:55:30 UTC (rev 855) @@ -78,12 +78,12 @@ if hasattr(val, 'childName'): childName = val.childName if childName is not None: - return val._childClasses[childName].get(id, selectResults=childResults) + return val._childClasses[childName].get(id, connection=connection, selectResults=childResults) #DSM: Now, we know we are alone or the last child in a family... #DSM: It's time to find our parents inst = val while inst._parentClass and not inst._parent: - inst._parent = inst._parentClass.get(id, childUpdate=True) + inst._parent = inst._parentClass.get(id, connection=connection, childUpdate=True) inst = inst._parent #DSM: We can now return ourself return val @@ -114,7 +114,7 @@ #DSM: Update each child class if needed and existing (only for new #DSM: dynamic column as no child classes exists at object creation) for c in cls._childClasses.values(): - c.addColumn(columnDef, childUpdate=True) + c.addColumn(columnDef, connection=connection, childUpdate=True) addColumn = classmethod(addColumn) |