]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add Load.options() for hierchical construction of loader options
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 20 Jun 2019 19:37:59 +0000 (15:37 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Jun 2019 03:28:12 +0000 (23:28 -0400)
commitce9de9fff675a96cb4aaef5d7d34f93dc9ad7002
treeea0bb71780048eae0761479e25eb57a5a536628c
parent22131f06294698781dca4b279bfeaed818bf1e43
Add Load.options() for hierchical construction of loader options

Added new loader option method :meth:`.Load.options` which allows loader
options to be constructed hierarchically, so that many sub-options can be
applied to a particular path without needing to call :func:`.defaultload`
many times.  Thanks to Alessio Bogon for the idea.

Also applies a large pass to the loader option documentation which
needed improvement.

Fixes: #4736
Change-Id: I93c453e30a20c074f27e87cf7e95b13dd3f2b494
(cherry picked from commit f0d1a5364fa8a9585b709239f85c4092439c4cd8)
doc/build/changelog/unreleased_13/4736.rst [new file with mode: 0644]
doc/build/orm/loading_columns.rst
doc/build/orm/loading_relationships.rst
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/strategy_options.py
test/orm/test_options.py