I use a similar technique with a Pylons controller, but instead of engine.begin(), I use session.begin(). Then by passing around the session for all calls made by that controller, I can use Session.execute() for expression-based and text-based SQL mixed with ORM ops, and it all commits in one shot on one thread without using threadlocal. This allows the freedom to open another session in a separate transaction for those odd places where it's needed, and have arbitrary expression-based SQL execute in that other transaction -- something I don't think you'll be able to do with threadlocal + implicit execution.
Rick --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
