From: Federico Caselli Date: Fri, 6 Oct 2023 19:36:50 +0000 (+0200) Subject: try to clarify defaultload option docs X-Git-Tag: rel_2_0_22~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c5d89aad3634a40e5d067c8df97bb7f775983e02;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git try to clarify defaultload option docs Change-Id: I529279ba5c7b546faf71a63aa680233cc3cae326 --- 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