From: Federico Caselli Date: Thu, 1 Apr 2021 17:36:23 +0000 (+0200) Subject: Improve noload documentation X-Git-Tag: rel_1_4_5~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cda2d69c15a593c81dbe321b991edb260e484698;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Improve noload documentation Fixes: #6156 Change-Id: I932de0e7ada0ae9079c0a0c1c72a50d7117d02fe --- diff --git a/doc/build/orm/loading_relationships.rst b/doc/build/orm/loading_relationships.rst index 770af73f04..2734e68707 100644 --- a/doc/build/orm/loading_relationships.rst +++ b/doc/build/orm/loading_relationships.rst @@ -61,9 +61,15 @@ The primary forms of relationship loading are: An introduction to raise loading is at :ref:`prevent_lazy_with_raiseload`. * **no loading** - available via ``lazy='noload'``, or the :func:`.noload` - option; this loading style turns the attribute into an empty attribute (``None``) that - will never load or have any loading effect. "noload" is a fairly - uncommon loader option. + option; this loading style turns the attribute into an empty attribute + (``None`` or ``[]``) that will never load or have any loading effect. This + seldom-used strategy behaves somewhat like an eager loader when objects are + loaded in that an empty attribute or collection is placed, but for expired + objects relies upon the default value of the attribute being returned on + access; the net effect is the same except for whether or not the attribute + name appears in the :attr:`.InstanceState.unloaded` collection. ``noload`` + may be useful for implementing a "write-only" attribute but this usage is not + currently tested or formally supported. .. _relationship_lazy_option: