On Wed, 19 Apr 2006, Elver Loho wrote:
On 4/19/06, Oleg Broytmann <[EMAIL PROTECTED]> wrote:
On Wed, Apr 19, 2006 at 05:24:56PM +0300, Elver Loho wrote:
class Transactions(SQLObject):
sqlmeta.fromDatabase = True
AttributeError: No connection has been defined for this thread or process
You asked SQLObject to draw the definition for the table from the
DB. SQLObject honestly tried to do exactly that and failed because it
cannot connect to the DB.
Initialize a connection before manipulating with the DB; setting
sqlmeta.fromDatabase = True is a manipulation...
I want to have a class that is initialised from the database. I also
want to put its definition in the same file or include the model just
once into my program. However, this is impossible as far as I know. Or
is it?
To clarify what you want, is it that you want to define define
sqlmeta.fromDatabase to be true and have the class not fetch its
attributes from the database until the class is *used*, rather than when
the class is *defined*? It appears that the latter is the current
behavior.
(Also, your tone is borderline flaming and certainly not respectful.
Please calm down and help work toward constructive solutions.)
-- Asheesh.
--
For some reason, this fortune reminds everyone of Marvin Zelkowitz.
-------------------------------------------------------
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&kid=120709&bid=263057&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss