On Thu, May 19, 2011 at 1:13 PM, Christoph Zwerschke <[email protected]> wrote:
>
> I'm not sure if instantiating DBSession() can be harmful or whether this
> means that you also have to care for closing or removing the session
> instance afterwards. Can you try if using the class directly works better
> for you?
>

using DBSession.query instead of DBSession().query shouldn't change a
thing as DBSession.query
is an automatically generated method that simply does
DBSession().query in the end.
Indeed using "session = DBSession(); session.query(); session.query()"
is an optimization even though I don't think
that it is one worth.

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en.

Reply via email to