]> 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:58:24 +0000 (10:58 -0400)
commit5e8c7c88de2d9bac58e82bc1e5af7fcad5405855
tree87094ca0ac2b087a7e54133ac2babfcfb994fbb7
parentc01f90de584f50f036c5b6d0c44074b4b3014da4
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
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