From d032c3cfea5ce799a637ea9d40b5f5209a3330c1 Mon Sep 17 00:00:00 2001 From: Saman Nezafat <77416478+onionj@users.noreply.github.com> Date: Sun, 28 Aug 2022 01:10:57 +0430 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=20Fix=20typo=20variable=20in=20exampl?= =?UTF-8?q?e=20about=20relationships=20and=20`back=5Fpopulates`,=20always?= =?UTF-8?q?=20use=20`hero`=20instead=20of=20`owner`=20(#120)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sebastián Ramírez --- .../relationship_attributes/back_populates/tutorial003.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs_src/tutorial/relationship_attributes/back_populates/tutorial003.py b/docs_src/tutorial/relationship_attributes/back_populates/tutorial003.py index c137f58..98e1970 100644 --- a/docs_src/tutorial/relationship_attributes/back_populates/tutorial003.py +++ b/docs_src/tutorial/relationship_attributes/back_populates/tutorial003.py @@ -36,7 +36,7 @@ class Hero(SQLModel, table=True): team: Optional[Team] = Relationship(back_populates="heroes") weapon_id: Optional[int] = Field(default=None, foreign_key="weapon.id") - weapon: Optional[Weapon] = Relationship(back_populates="owner") + weapon: Optional[Weapon] = Relationship(back_populates="hero") powers: List[Power] = Relationship(back_populates="hero")