diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2021-04-01 19:36:23 +0200 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-04-02 11:25:47 -0400 |
| commit | cda2d69c15a593c81dbe321b991edb260e484698 (patch) | |
| tree | e02c047d1dc8168d06433ad1b2ce3edce9c1062c | |
| parent | 3a29d65f73c6e705f486588068172d45017285fa (diff) | |
| download | sqlalchemy-cda2d69c15a593c81dbe321b991edb260e484698.tar.gz | |
Improve noload documentation
Fixes: #6156
Change-Id: I932de0e7ada0ae9079c0a0c1c72a50d7117d02fe
| -rw-r--r-- | doc/build/orm/loading_relationships.rst | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/build/orm/loading_relationships.rst b/doc/build/orm/loading_relationships.rst index 770af73f0..2734e6870 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: |
