baus wrote: > I found the need to this a bit disconcerting in that I really don't > understand why it is necessary. I wish somebody could explain it to > me.
SQLAlchemy has a session context, which tracks objects that have been loaded from the database, modifications to them, and pending changes. This context is thread-local in the case of the session_context. It's also what makes it possible and easy, to issue a single command to 'flush' the modifications to loaded objects back to the database. However, as the context is thread-local, if you don't clear it at the beginning of a request, you could likely have 'stale' objects from the prior request hanging around. Hope that helps! - Ben --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---