On Sat, 2008-12-13 at 23:37 +0200, Iwan Vosloo wrote:
> On Sat, 2008-12-13 at 20:39 +0300, Oleg Broytmann wrote:
> > On Sat, Dec 13, 2008 at 07:26:14PM +0200, Iwan Vosloo wrote:
> Maybe a simple workaround would be to implement a server_version method
> on the Transaction too? (Or to just set it to a value.)

Yup, I have verified this as a workaround.  The following code works
correctly:

import sqlobject

connectionURI = 'postgres://rhug:r...@localhost/rhug'

import pdb; pdb.set_trace()

conn = sqlobject.connectionForURI(connectionURI).transaction()

# The workaround, so that __getattr__ would not get called:
conn.server_version = conn.queryOne("SELECT version()")[0][1]  

class TestMe(sqlobject.SQLObject):
    pass

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



------------------------------------------------------------------------------
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