On Wed, Feb 03, 2010 at 01:37:08PM -1000, John Bresnahan wrote: > 2) at what point is an object associated with a DB connection? > 3) is it at all possible to change the DB connection associated with a given > object?
Objects (SQLObject instances that correspond to rows in a table) are seldom associated with a connection (though it is certainly possible). SQLObject classes (that correspond to tables) are usually associated with a connection; .setConnection() is a class method. To associate an object with a connection you have to SELECT it via that connection: > trans = sqlhub.processConnection.transaction() and now do xfer = XferTable.get(id, connection=trans) or XferTable.select(condition, connection=trans). Most SQLObject methods accept 'connection' parameter. Oleg. -- Oleg Broytman http://phd.pp.ru/ p...@phd.pp.ru Programmers don't die, they just GOSUB without RETURN. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss