]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
omit_join=True is not supported
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 30 Oct 2019 18:42:10 +0000 (14:42 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 31 Oct 2019 13:36:36 +0000 (09:36 -0400)
commitf09501c61e28261a2cb54d6a9a8a894c6b153aae
tree4df618a0147a3589d6aa5d28901b9465576af0f8
parenta82c7d2992f7d6180f1b6a5c08207ec665950d2d
omit_join=True is not supported

The :paramref:`.relationship.omit_join` flag was not intended to be
manually set to True, and will now emit a warning when this occurs.  The
omit_join optimization is detected automatically, and the ``omit_join``
flag was only intended to disable the optimization in the hypothetical case
that the optimization may have interfered with correct results, which has
not been observed with the modern version of this feature.   Setting the
flag to True when it is not automatically detected may cause the selectin
load feature to not work correctly when a non-default primary join
condition is in use.

Fixes: #4954
Change-Id: I3afebefb13ddaf8f74c5c2b9e6e6a1a261ac5629
(cherry picked from commit 9b774743952fa4f459a914604cc8395175eca07e)
doc/build/changelog/unreleased_13/4954.rst [new file with mode: 0644]
lib/sqlalchemy/orm/relationships.py
lib/sqlalchemy/orm/strategies.py
test/orm/test_selectin_relations.py