Hi,
I've been playing around to map sqlobjects on a wordpress database and
found this annoying bug
http://www.tahorg.net/stuff/sqlobject-mysql-bug
So, I found that the probleme is in col.py
if dbName is None:
self.dbName = soClass.sqlmeta.style.pythonAttrToDBColumn(self.name)
I've tried passing the real column name in argument. I'm
not really used to sqlobject code but I've made the attached modif and
it worked.
Hope this helps,
Loïc.
Index: sqlobject/mysql/mysqlconnection.py
===================================================================
--- sqlobject/mysql/mysqlconnection.py (revision 1954)
+++ sqlobject/mysql/mysqlconnection.py (working copy)
@@ -166,6 +166,7 @@
if self.client_encoding: kw['dbEncoding'] =
self.client_encoding
kw['name'] = soClass.sqlmeta.style.dbColumnToPythonAttr(field)
kw['notNone'] = not nullAllowed
+ kw['dbName'] = field
if default and t.startswith('int'):
kw['default'] = int(default)
else:
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss