I ran into an issue when transitioning a scoped session to a regular 
session in an application.

A block of code had previously created a secondary session (to the same 
database) to autocommit some data outside of the session/transaction:
   
    dbSessionAutocommit = dbSession.session_factory(autocommit = True)
   ... do something ...
    dbSessionAutocommit.flush()
    dbSessionAutocommit.close()

this broke on transition, as the non-scoped session doesn't have a 
`session_factory` method.

going through the documentation, there's nothing in the API/narrative/faq 
that seems to correspond with my needs (new session, same engine, different 
connection; only different is in autocommit)

does anyone have a clue on how I could build a new session?     
dbSession.__class__(autocommit=True) won't work, as it won't have a 
configured engine.

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to