Skip to content

set cascades on relationships based on foreign key #3210

@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by yoch (@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)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    featuresqlalchemy.extextension modules, most of which are ORM related

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions