[sqlalchemy] Re: ORM-level “delete” cascade vs. FOREIGN KEY level “ON DELETE” cascade explanation

2019-10-10 Thread 'Marc Vegetti' via sqlalchemy
Hello, first of all, thnak you for your fast answer. I was refering to : > > A database level ON DELETE cascade is configured effectively on the > *many-to-one* side of the relationship; that is, we configure it relative > to the FOREIGN KEY constraint that is the “many” side of a relationship.

[sqlalchemy] ORM-level “delete” cascade vs. FOREIGN KEY level “ON DELETE” cascade explanation

2019-10-09 Thread 'Marc Vegetti' via sqlalchemy
Hello, I'm currently auditing a database which uses sqlalchemy 1.1.9 and PostgreSQL 10 with Python 3.5. There are a few foreign keys which are set to *ON DELETE CASCADE* on the database but are not set as such on the ORM side. My first thought was to simply add in the ForeignKey, a *ondelete='C