Re: [sqlalchemy] Re: Strange ObjectDeletedError

2011-02-09 Thread Michael Bayer
sure, you commit too often, and if you're expiring too, then you're re-selecting all the time. On Feb 9, 2011, at 3:54 AM, Romy Maxwell wrote: > I never did understand the pros or cons of running autocommit=True, > aside from this flushing issue. Are there performance implications ? > > On Mon

Re: [sqlalchemy] Re: Strange ObjectDeletedError

2011-02-09 Thread Romy Maxwell
I never did understand the pros or cons of running autocommit=True, aside from this flushing issue. Are there performance implications ? On Mon, Feb 7, 2011 at 1:22 PM, Michael Bayer wrote: > I actually just did a little bit of reverse course on this in 0.7.   I've > moved all the accounting int

Re: [sqlalchemy] Re: Strange ObjectDeletedError

2011-02-07 Thread Michael Bayer
I actually just did a little bit of reverse course on this in 0.7. I've moved all the accounting into the try/except block so that the flush completes fully before the autocommit expires everything. This is a change to a pattern that's been the same way since 0.4 so hoping nothing bad happen

[sqlalchemy] Re: Strange ObjectDeletedError

2009-10-05 Thread Y3s
On Oct 5, 4:59 am, Michael Bayer wrote: > On Oct 4, 2009, at 7:54 PM, Y3s wrote: > > > Session = orm.sessionmaker(autocommit=True, autoflush=False) > > you're using non-default session settings, all attributes are expired   > upon transaction commit which in this case due to autocommit makes th

[sqlalchemy] Re: Strange ObjectDeletedError

2009-10-04 Thread Michael Bayer
On Oct 4, 2009, at 7:54 PM, Y3s wrote: > Session = orm.sessionmaker(autocommit=True, autoflush=False) you're using non-default session settings, all attributes are expired upon transaction commit which in this case due to autocommit makes the object unreachable within the flush, so set expir