From: krave1986 Date: Mon, 20 Oct 2025 20:06:31 +0000 (+0800) Subject: Fix missing back_populates in Note.item relationship in example code (#12925) X-Git-Tag: rel_2_0_45~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=441a4f8785650752fb775004cd1534d1d0c37323;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 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. (cherry picked from commit 1220858a0c5e85d4600b249dc3ae9412e01608ad) --- diff --git a/doc/build/orm/collection_api.rst b/doc/build/orm/collection_api.rst index 1777964cbb..b5b55b9d79 100644 --- a/doc/build/orm/collection_api.rst +++ b/doc/build/orm/collection_api.rst @@ -237,7 +237,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):