Sqlalchemy Attempting To Twice Delete Many To Many Secondary Relationship
I have a product model with a many to many relationship to product_categories as described below: class Product(Base): ''' The SQLAlchemy declarative model class for a Product
Solution 1:
After a bit more searching, I found the following link which suggests it's a MySQL bug: https://groups.google.com/forum/#!topic/sqlalchemy/ajYLEuhEB9k
Thankfully, disabling supports_san_multi_rowcount
helped!
engine = engine_from_config(settings, 'sqlalchemy.')
engine.dialect.supports_sane_rowcount = engine.dialect.supports_sane_multi_rowcount = False
Good enough for me for now. Here's another interesting resources I found along the way dealing with postgresql: https://bitbucket.org/zzzeek/sqlalchemy/issue/3015/deletes-executed-twice-when-using
Post a Comment for "Sqlalchemy Attempting To Twice Delete Many To Many Secondary Relationship"