Hi Michael,

On 29/04/2013 19:58, Michael Bayer wrote:
I don't know what "wx.GetApp().ds" is, but a "commit", assuming this is a 
Session, will return the current connection back to the connection pool, and any session changes 
stay with that connection.  Using the Session again will pull up a potentially different connection.
wx.GetApp().ds was created by:

engine = db.sa.create_engine(dburl, encoding='utf8',
                                              echo=self.salog)

DBSession.configure(bind=engine)
maker = sao.sessionmaker(autoflush=True, autocommit=False,
                         expire_on_commit=True)
DBSession = sao.scoped_session(maker)

app.ds = DBSession() # just checked again that I do this only in one place of my code

"app" above == wx.GetApp().ds and this is what I use in the wxPython app to get always the same session and I think I also always get the same connection, but will check this again tomorrow.

As always thanks for your time and explanation.
Werner

--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to