Hi,

We seem to have tickled another bug.

Here's how:
Do NOT set a threadconnection, but use an explicit one.
Select from a a class that inherits from another InheritableSQLObject
derived class.
And then, do splicing on it.

Any ideas as to a fix?

The code below illustrates:

Regards
- Iwan

import sqlobject
import sqlobject.inheritance

connectionURI = 'postgres://rhug:r...@localhost/rhug'
conn = sqlobject.connectionForURI(connectionURI).transaction()


class TestMeParent(sqlobject.inheritance.InheritableSQLObject):
    pass

class TestMe(TestMeParent):
    pass

TestMeParent.createTable(connection=conn)
TestMe.createTable(connection=conn)

t = TestMe(connection=conn)
allt = TestMe.select(connection=conn)
t0 = allt[0]  # Here it complains about threadConnection not being set
              # But, the select above WAS done with an explicit one...

TestMe.dropTable(connection=conn)
conn.commit()



------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to