[SQL-CVS] r944 - trunk/SQLObject/sqlobject/inheritance
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: <sub...@co...> - 2005-08-25 13:54:59
|
Author: phd
Date: 2005-08-25 13:54:49 +0000 (Thu, 25 Aug 2005)
New Revision: 944
Modified:
trunk/SQLObject/sqlobject/inheritance/__init__.py
Log:
Fixed a bug with inherited ForeignKeys.
Modified: trunk/SQLObject/sqlobject/inheritance/__init__.py
===================================================================
--- trunk/SQLObject/sqlobject/inheritance/__init__.py 2005-08-25 08:26:12 UTC (rev 943)
+++ trunk/SQLObject/sqlobject/inheritance/__init__.py 2005-08-25 13:54:49 UTC (rev 944)
@@ -75,6 +75,7 @@
for col in soClass._parentClass.sqlmeta.columnList:
cname = col.name
if cname == 'childName': continue
+ if cname.endswith("ID"): cname = cname[:-2]
setattr(soClass, getterName(cname), eval(
'lambda self: self._parent.%s' % cname))
if not col.immutable:
|