]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
synonym fixes and enhancements
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 16 Apr 2021 12:56:17 +0000 (08:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 16 Apr 2021 15:29:53 +0000 (11:29 -0400)
commitb73fc8f874da94c9c5b2d94feb6b1b45b7f4f02b
treea008891963604495c33205f3fcc0f92aba623592
parentb3d764fa768756cd7aef73253ccceac456c76c81
synonym fixes and enhancements

Fixed regression where an attribute that is mapped to a
:func:`_orm.synonym` could not be used in column loader options such as
:func:`_orm.load_only`.

Established support for :func:`_orm.synonym` in conjunction with hybrid
property, associationproxy, including that synonyms can be established
linking to these constructs which work fully. This is a behavior that was
semi-explicitly disallowed previously, however since it did not fail in
every scenario, explicit support for assoc proxy and hybrids has been
added.

Fixes: #6272
Fixes: #6267
Change-Id: Ie75bb3b535feeb6ccf3f6a391f21b69f241e625e
doc/build/changelog/unreleased_14/6272_etc.rst [new file with mode: 0644]
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/descriptor_props.py
test/ext/test_associationproxy.py
test/ext/test_hybrid.py
test/orm/test_deferred.py
test/orm/test_mapper.py