This is insane. I cannot put this at the beginning of a larger Python program:

from sqlobject import *

class Transactions(SQLObject):
        sqlmeta.fromDatabase = True
        _style = MixedCaseStyle()

Because it complains that:

AttributeError: No connection has been defined for this thread or process

I've got a separate DB manager class that creates the connection and
is supposed to be shuffling instances of the Transactions object
around.

The (ugly) workaround seems to be putting that bit of code in another
file and then including that right before I need to use it in DB
manager's methods. Which is a really bad hack, if you ask me. Is there
a cleaner solution?

Furthermore it tells me to use sqlmeta's style instead of _style, but
from what I recall working on an earlier project, these two have
different behaviour. What's the solution?


Elver


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to