On Thu, May 03, 2007 at 03:10:25PM -0700, Dobromir Montauk wrote:
> Thanks for the answer Oleg... I have one more question - my set up is a
> little more complicated than I described. I actually have this:
> 
> class SmartSQLObject(SQLObject)
>  # does stuff
> 
> class foo(SmartSQLObject):
>  # does stuff
> 
> class bar(SmartSQLObject):
>  # does stuff
> 
> Now, "foo" and "bar" actually want to connect to different databases. But
> because they use the same sqlhub, when I set the connection on one, it sets
> the connection on the other as well (when imported into the same namespace).
> Is there a way to avoid that as well?

   No. Do not use sqlhub for this setup at all. Just set _connection:

class foo(SmartSQLObject):
   _connection = connectionForUR(URI1)

class bar(SmartSQLObject):
   _connection = connectionForUR(URI2)

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to