Skip to content

Commit 8346e52

Browse files
authored
✏️ Fix typos in docs/tutorial/relationship-attributes/cascade-delete-relationships.md (#1543)
Fix typos
1 parent f3186a2 commit 8346e52

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ For example, **SQLite** doesn't support them by default. They have to be manuall
185185
PRAGMA foreign_keys = ON;
186186
```
187187

188-
So, in general is a good idea to have both `cascade_delete` and `ondelete` configured.
188+
So, in general it's a good idea to have both `cascade_delete` and `ondelete` configured.
189189

190190
/// tip
191191

@@ -203,7 +203,7 @@ Just a note to remember... 🤓
203203
class Hero(SQLModel, table=True):
204204
...
205205

206-
team_id: int Field(foreign_key="team.id", ondelete="CASCADE")
206+
team_id: int = Field(foreign_key="team.id", ondelete="CASCADE")
207207
```
208208

209209
* `cascade_delete` is put on the `Relationship()`. Normally on the **"one"** side in "one-to-many" relationships, the side **without a foreign key**.
@@ -348,7 +348,7 @@ The result would be these tables.
348348

349349
| id | name | secret_name | age | team_id |
350350
| ---- | --------------- | ---------------- | ---- | ------- |
351-
| 1 | Deadpond | Dive WIlson | | 1 |
351+
| 1 | Deadpond | Dive Wilson | | 1 |
352352
| 2 | Rusty-Man | Tommy Sharp | 48 | 2 |
353353
| 3 | Spider-Boy | Pedro Parqueador | | 2 |
354354
| 4 | Black Lion | Trevor Challa | 35 | NULL |

0 commit comments

Comments
 (0)