dev:python:flask:flask-sqlalchemy:relation_composition
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédente | |
| dev:python:flask:flask-sqlalchemy:relation_composition [2024/12/08 12:44] – yoann | dev:python:flask:flask-sqlalchemy:relation_composition [2025/08/03 19:49] (Version actuelle) – yoann |
|---|
| <code python> | <code python> |
| </code> | </code> |
| | |
| | |
| | ===== Cascader les suppressions ===== |
| | |
| | :TODO_DOCUPDATE: |
| | |
| | In order to clarify this a little.. ondelete="CASCADE" instructs the DB itself to create cascade deletes on the foreign keys. cascade="all,delete" is an instruction for sqlalchemy to manage the cascading. |
| |
| |
| ===== Références ===== | ===== Références ===== |
| |
| * | |
| * https://medium.com/@thinesh12/unlocking-the-power-of-composite-primary-keys-in-sqlalchemy-b378fb975e9b | * https://medium.com/@thinesh12/unlocking-the-power-of-composite-primary-keys-in-sqlalchemy-b378fb975e9b |
| * https://www.devgem.io/posts/how-to-correctly-define-a-primary-key-in-sqlalchemy-with-sqlite-backend | * https://www.devgem.io/posts/how-to-correctly-define-a-primary-key-in-sqlalchemy-with-sqlite-backend |
dev/python/flask/flask-sqlalchemy/relation_composition.1733661866.txt.gz · Dernière modification : 2024/12/08 12:44 de yoann