]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Fixes for uselist=True with m2o relationships
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 18 Jul 2019 14:58:24 +0000 (10:58 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 18 Jul 2019 14:59:38 +0000 (10:59 -0400)
commit86f4ae32664ca8dedd5a8f82a7afb9291af94dec
treed41b0722bcf74a83f15bfb1404c4ca2213088669
parent194c7d3e3a464d453da0d46e4320b36257fc2236
Fixes for uselist=True with m2o relationships

Fixed bug where a many-to-one relationship that specified ``uselist=True``
would fail to update correctly during a primary key change where a related
column needs to change.

Fixed bug where the detection for many-to-one or one-to-one use with a
"dynamic" relationship, which is an invalid configuration, would fail to
raise if the relationship were configured with ``uselist=True``.  The
current fix is that it warns, instead of raises, as this would otherwise be
backwards incompatible, however in a future release it will be a raise.

Fixes: #4772
Change-Id: Ibd5d2f7329ff245c88118e2533fc8ef42a09fef3
(cherry picked from commit 5e8c7c88de2d9bac58e82bc1e5af7fcad5405855)
doc/build/changelog/unreleased_13/4772.rst [new file with mode: 0644]
lib/sqlalchemy/orm/dependency.py
lib/sqlalchemy/orm/dynamic.py
lib/sqlalchemy/testing/entities.py
test/orm/test_dynamic.py
test/orm/test_naturalpks.py