]> 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>
Wed, 30 Oct 2019 18:47:04 +0000 (14:47 -0400)
commit9b774743952fa4f459a914604cc8395175eca07e
tree5d1149947b7ad097ca46a70445833571c49732a5
parent77adce762b2a9ea19fcd72a28482faf63cef4844
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
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