[sqlalchemy] flush overflow counter debug

2012-12-04 Thread Jason
After upgrading to SQLAlchemy 0.7.9 I know receive an error FlushError: Over 100 subsequent flushes have occurred within session.commit() - is an after_flush() hook creating new objects? which is was introduced by

Re: [sqlalchemy] flush overflow counter debug

2012-12-04 Thread Michael Bayer
On Dec 4, 2012, at 3:04 PM, Jason wrote: After upgrading to SQLAlchemy 0.7.9 I know receive an error FlushError: Over 100 subsequent flushes have occurred within session.commit() - is an after_flush() hook creating new objects? which is was introduced by

Re: [sqlalchemy] flush overflow counter debug

2012-12-04 Thread Jason
Does this mean there is a limit to the number of queries I can run in a transaction? For example I am looping about 20 times. For each loop I insert one or two rows and do at least one query. There might be some more implicit queries when accessing relationship properties. If I set

Re: [sqlalchemy] flush overflow counter debug

2012-12-04 Thread Jason
Disregard that, I spoke too soon. There is something going on after it starts the commit process. On Tuesday, December 4, 2012 3:35:40 PM UTC-5, Jason wrote: Does this mean there is a limit to the number of queries I can run in a transaction? For example I am looping about 20 times. For

Re: [sqlalchemy] flush overflow counter debug

2012-12-04 Thread Jason
Ok I figured out the cause, but not the solution. I am using a mutable type for hstore columns. I have a UserDefinedType for Hstore that just passes everything through to psycopg2's hstore type: class HStore(UserDefinedType): SQLAlchemy type that passes through values to be handled by a

Re: [sqlalchemy] flush overflow counter debug

2012-12-04 Thread Jason
On Tuesday, December 4, 2012 4:15:03 PM UTC-5, Jason wrote: Ok I figured out the cause, but not the solution. I am using a mutable type for hstore columns. I have a UserDefinedType for Hstore that just passes everything through to psycopg2's hstore type: class HStore(UserDefinedType):

Re: [sqlalchemy] flush overflow counter debug

2012-12-04 Thread Michael Bayer
have you tried 0.8 which now provides HSTORE built in ? it's not apparent from this code fragment why your flush process is producing residual state. I'd need a fully runnable and succinct test case to analyze exactly what's going on. On Dec 4, 2012, at 4:38 PM, Jason wrote: On