From 13f569fd615485c50e07f211e37e45d749ccc40d Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 13 Sep 2025 09:54:38 -0400 Subject: [PATCH] remove confusing "with_parent()" from query-enabled properties example references: #12862 Change-Id: I22ee9fa0c566458a465867e307a77c2eb0ddcdd0 --- doc/build/orm/join_conditions.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/build/orm/join_conditions.rst b/doc/build/orm/join_conditions.rst index ed7d06c05f..6c6aba8553 100644 --- a/doc/build/orm/join_conditions.rst +++ b/doc/build/orm/join_conditions.rst @@ -1055,7 +1055,14 @@ conjunction with :class:`_query.Query` as follows: @property def addresses(self): - return object_session(self).query(Address).with_parent(self).filter(...).all() + # query using any kind of filter() criteria + return ( + object_session(self) + .query(Address) + .filter(Address.user_id == self.id) + .filter(...) + .all() + ) In other cases, the descriptor can be built to make use of existing in-Python data. See the section on :ref:`mapper_hybrids` for more general discussion -- 2.47.3