Author: nunofsantos
Date: 2007-11-14 15:35:07 -0500 (Wed, 14 Nov 2007)
New Revision: 1314
Modified:
mgmt/mint/schemaparser.py
Log:
fix bug introduced @r1291
Modified: mgmt/mint/schemaparser.py
===================================================================
--- mgmt/mint/schemaparser.py 2007-11-14 20:16:13 UTC (rev 1313)
+++ mgmt/mint/schemaparser.py 2007-11-14 20:35:07 UTC (rev 1314)
@@ -121,7 +121,7 @@
# generate foreign keys
refName = self.attrNameFromDbColumn(refName, "Mint", "Ref")
# add missing attribute (not added correctly with SqlObject 0.7.7; may need to be
removed in later versions)
- self.pythonOutput += " _SO_class_%s = None\n" %
(self.style.pythonAttrToDBColumn(refName).capitalize())
+ self.pythonOutput += " _SO_class_%s = %s\n" %
(self.style.pythonAttrToDBColumn(refName).capitalize(), refName)
self.additional += "\n%s.sqlmeta.addJoin(MultipleJoin('%s" %
(refName, name)
self.additional += "', joinMethodName='%ss'))" %
(name.replace("Mint", "").lower())
@@ -162,7 +162,7 @@
self.additional = ""
if (name != "" and not name.endswith("Stats")):
# add missing attribute (not added correctly with SqlObject 0.7.7; may need to be
removed in later versions)
- self.pythonOutput += " _SO_class_%s_stats = None\n" %
(self.style.pythonAttrToDBColumn(name).capitalize())
+ self.pythonOutput += " _SO_class_%s_stats = %sStats\n" %
(self.style.pythonAttrToDBColumn(name).capitalize(), name)
def getCode(self):
return self.pythonOutput
Show replies by date