[sqlalchemy] foreign key to *any* other class?

2010-01-10 Thread Jules Stevenson
Sorry for the bad subject, and probably incorrect terminology but is it possible to set up a table that would allow a foreign key link (or any other technique) that would enable it to bind against *any* other mapped class? The context for this is there is a DB table that stores tasks to be

[sqlalchemy] tracking back from logged sql back to the python that caused it

2010-01-10 Thread Chris Withers
Hi All, So, we have some (well, about 1.7M a day, so more than some...) unknown ROLLBACKs occurring. Creating the engine with echo=True can show use that these rollbacks are indeed happening, but tracking these down lead me to a more widespread question: If you have analysis tools that tell

Re: [sqlalchemy] tracking back from logged sql back to the python that caused it

2010-01-10 Thread Michael Bayer
the connection pool issues a ROLLBACK when a connection is returned to the pool. This releases any remaining transactional state on the connection. However, this particular ROLLBACK isn't logged with the echo=True part of things, so you'd only see this in your MySQL logs - the echo setting

Re: [sqlalchemy] foreign key to *any* other class?

2010-01-10 Thread Michael Bayer
On Jan 10, 2010, at 2:55 PM, Jules Stevenson wrote: Sorry for the bad subject, and probably incorrect terminology but is it possible to set up a table that would allow a foreign key link (or any other technique) that would enable it to bind against *any* other mapped class? The context