[Sqlalchemy-tickets] Issue #3210: automap_base don't use cascades properly (zzzeek/sqlalchemy)
Brought to you by:
zzzeek
|
From: yoch <iss...@bi...> - 2014-09-23 00:04:42
|
New issue 3210: automap_base don't use cascades properly https://bitbucket.org/zzzeek/sqlalchemy/issue/3210/automap_base-dont-use-cascades-properly yoch: I'm use automap_base() to reflect existing MySQL database into the ORM. There are some Foreign Key constraints which intended to cascade deletions, but the child rows are not deleted. If we add an NOT NULL constraint on these rows, I got Integrity violation error, because SQLAlchemy try to set IDs to NULL instead of delete them : "UPDATE gestion_horaire SET idscenario=%s WHERE gestion_horaire.id = %s' (None, 41L)" |