On Apr 6, 2007, at 5:18 AM, Arun Kumar PG wrote:
> Hi Guys, > > I have a web application wherein ORM session object is created per > HTTP request and flushed before sending the response back to the > client. > > I was wondering which one is a better practice.. the one mentioned > above or creating new session and flushing the same wherever > required in the business logic ? > > Answers appreciated. > I like creating a session per request best. if you need to perform some finer-grained operations within a request which need to be committed separately, or you need to load some objects "out of session", then you can create ad-hoc sessions for that purpose. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
