[SQL-CVS] r158 - trunk/SQLObject/sqlobject
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2004-07-09 20:29:19
|
Author: ianb Date: 2004-07-09 12:24:19 -0400 (Fri, 09 Jul 2004) New Revision: 158 Modified: trunk/SQLObject/sqlobject/main.py Log: Allow _connection to be inherited. Modified: trunk/SQLObject/sqlobject/main.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/SQLObject/sqlobject/main.py 2004-06-30 12:24:26 UTC (rev 157) +++ trunk/SQLObject/sqlobject/main.py 2004-07-09 16:24:19 UTC (rev 158) @@ -114,7 +114,8 @@ if hasattr(mod, '__connection__'): connection =3D mod.__connection__ =20 - newClass.setConnection(connection) + if connection or not hasattr(newClass, '_connection'): + newClass.setConnection(connection) =20 # The style object tells how to map between Python # identifiers and Database identifiers: |