Skip to content

Commit 605bc82

Browse files
authored
✏️ Fix typo in cascade_delete docs (#1030)
1 parent 65d06ea commit 605bc82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/tutorial/relationship-attributes/cascade-delete-relationships.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ FROM team
503503
WHERE team.name = ?
504504
INFO Engine [generated in 0.00014s] ('Wakaland',)
505505

506-
// Then, because of delete_cascade, right before deleting Wakaland, SQLAlchemy loads the heroes
506+
// Then, because of cascade_delete, right before deleting Wakaland, SQLAlchemy loads the heroes
507507
INFO Engine SELECT hero.id AS hero_id, hero.name AS hero_name, hero.secret_name AS hero_secret_name, hero.age AS hero_age, hero.team_id AS hero_team_id
508508
FROM hero
509509
WHERE ? = hero.team_id
@@ -531,7 +531,7 @@ Princess Sure-E not found: None
531531

532532
We can configure the database to **set the foreign key** (the `team_id` in the `hero` table) to **`NULL`** when the related record (in the `team` table) is deleted.
533533

534-
In this case, the side with `Relationship()` won't have `delete_cascade`, but the side with `Field()` and a `foreign_key` will have `ondelete="SET NULL"`.
534+
In this case, the side with `Relationship()` won't have `cascade_delete`, but the side with `Field()` and a `foreign_key` will have `ondelete="SET NULL"`.
535535

536536
//// tab | Python 3.10+
537537

0 commit comments

Comments
 (0)