]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Generalize DescriptorProps.uses_objects
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 23 Nov 2019 17:25:20 +0000 (12:25 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 23 Nov 2019 17:31:29 +0000 (12:31 -0500)
commit6bef95307862286f1d53b887c20d03344284d948
tree306e5552d6ffd2570520ead2d686051a06c49842
parente4927a881a721f42afb1a25dd8dc9806a7a1a3d0
Generalize DescriptorProps.uses_objects

Previously, uses_objects was specific to the SynonymAttribute;
generalize it so that it defaults to False for other DescriptorProps.
Immediate fix is against CompositeProperty.

Fixed regression introduced in 1.3.0 related to the association proxy
refactor in :ticket:`4351` that prevented :func:`.composite` attributes
from working in terms of an association proxy that references them.

Add test coverage for association proxies that refer to Composite
attributes as endpoints.

Fixes: #5000
Change-Id: Iea6fb1bd3314d861a9bc22491b0ae1e6c5e6340d
(cherry picked from commit c2432d9d190bdc67f274b8da9296ff9ed044bef1)
doc/build/changelog/unreleased_13/5000.rst [new file with mode: 0644]
lib/sqlalchemy/orm/descriptor_props.py
lib/sqlalchemy/testing/fixtures.py
test/ext/test_associationproxy.py