Skip to content

Commit c5de013

Browse files
YuriiMotovsvlandeg
andauthored
Apply suggestions from code review
Co-authored-by: Sofie Van Landeghem <[email protected]>
1 parent a8a4cea commit c5de013

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/advanced/advanced-relationships/self-referential.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Oftentimes we need to model a relationship between one entity of some class and
44

55
In database terms this means having a table with a foreign key reference to the primary key in the same table.
66

7-
Say, for example, we want to introduce a `Villain` class. 😈 Every villain can have a **boss**, who also must be a villain. If a villain is the boss to other villains, we want to call those his **minions**.
7+
Say, for example, we want to introduce a `Villain` class. 😈 Every villain can have a **boss**, who also must be a villain. If a villain is the boss of other villains, we want to call those his **minions**.
88

99
Let's implement this with **SQLModel**. 🤓
1010

@@ -58,7 +58,7 @@ And if we want to add minions to a boss afterward, it's as easy as adding items
5858

5959
{* ./docs_src/advanced/self_referential/tutorial001.py ln[31:32,58:69] hl[61] *}
6060

61-
Since our relationships work both ways, we don't even need to add all our `clone_bot_`s to the session individually. Instead, we can simply add ultra_bot again and commit the changes. We do need to refresh them individually, though, if we want to access their updated attributes.
61+
Since our relationships work both ways, we don't even need to add all our `clone_bot_`s to the session individually. Instead, we can simply add `ultra_bot` again and commit the changes. We do need to refresh them individually, though, if we want to access their updated attributes.
6262

6363
## Traversing the relationship graph
6464

0 commit comments

Comments
 (0)