From 1220858a0c5e85d4600b249dc3ae9412e01608ad Mon Sep 17 00:00:00 2001 From: krave1986 Date: Tue, 21 Oct 2025 04:06:31 +0800 Subject: [PATCH] Fix missing back_populates in Note.item relationship in example code (#12925) Without back_populates, the subsequent code would not automatically populate Item.notes or generate the key, which contradicts what the documentation intends to demonstrate. --- doc/build/orm/collection_api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/build/orm/collection_api.rst b/doc/build/orm/collection_api.rst index d1fbe8c00b..a04160edee 100644 --- a/doc/build/orm/collection_api.rst +++ b/doc/build/orm/collection_api.rst @@ -220,7 +220,7 @@ of the ``Note.text`` field:: keyword: Mapped[str] text: Mapped[str] - item: Mapped["Item"] = relationship() + item: Mapped["Item"] = relationship(back_populates="notes") @property def note_key(self): -- 2.47.3