]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Improve noload documentation
authorFederico Caselli <cfederico87@gmail.com>
Thu, 1 Apr 2021 17:36:23 +0000 (19:36 +0200)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 2 Apr 2021 15:25:47 +0000 (11:25 -0400)
Fixes: #6156
Change-Id: I932de0e7ada0ae9079c0a0c1c72a50d7117d02fe

doc/build/orm/loading_relationships.rst

index 770af73f0437de5824c718e389ec2dddfb3dbd79..2734e68707edff732780533e5448921be70f0ecd 100644 (file)
@@ -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: