From c5d89aad3634a40e5d067c8df97bb7f775983e02 Mon Sep 17 00:00:00 2001 From: Federico Caselli Date: Fri, 6 Oct 2023 21:36:50 +0200 Subject: [PATCH] try to clarify defaultload option docs Change-Id: I529279ba5c7b546faf71a63aa680233cc3cae326 --- lib/sqlalchemy/orm/strategy_options.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/sqlalchemy/orm/strategy_options.py b/lib/sqlalchemy/orm/strategy_options.py index 757e1be853..c9ccd9cde9 100644 --- a/lib/sqlalchemy/orm/strategy_options.py +++ b/lib/sqlalchemy/orm/strategy_options.py @@ -542,7 +542,12 @@ class _AbstractLoad(traversals.GenerativeOnTraversal, LoaderOption): ) def defaultload(self, attr: _AttrType) -> Self: - """Indicate an attribute should load using its default loader style. + """Indicate an attribute should load using its predefined loader style. + + The behavior of this loading option is to not change the current + loading style of the attribute, meaning that the previously configured + one is used or, if no previous style was selected, the default + loading will be used. This method is used to link to other loader options further into a chain of attributes without altering the loader style of the links -- 2.47.3