On Aug 5, 10:59 pm, drakkan <drakkan1...@gmail.com> wrote:
> Seems that once I defined a scoped session as:
>
> Session = scoped_session(sessionmaker())
>
> I can switch to a non scoped session simply calling:
>
> sess=Session()
...
> is this the intended behaviuor?

Yes that is intended behavior. But if you are using a session across
threads be aware that sessions are not thread-safe. You shouldn't do
anything that modifies the session concurrently, that includes
Session.add and Session.query, but also triggering lazyloads on
objects or modifying their attributes.

See http://www.sqlalchemy.org/docs/05/session.html#frequently-asked-questions
for some discussion.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to