[sqlalchemy] ObjectDeletedError on orm.Query.delete

2010-07-01 Thread Yang Zhang
We're getting a strange ObjectDeletedError that we've been trying to debug for a large part of the day. The problem occurs when we keep a (hard) reference to an ORM object, drop_all, create_all, then delete() on a query over that ORM class (using the same scoped_session). Unfortunately, just the

Re: [sqlalchemy] ObjectDeletedError on orm.Query.delete

2010-07-01 Thread Michael Bayer
On Jul 1, 2010, at 9:40 PM, Yang Zhang wrote: We're getting a strange ObjectDeletedError that we've been trying to debug for a large part of the day. The problem occurs when we keep a (hard) reference to an ORM object, drop_all, create_all, then delete() on a query over that ORM class (using