]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Implement raiseload for deferred columns
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 11 Oct 2019 18:45:24 +0000 (14:45 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 16 Oct 2019 17:33:01 +0000 (13:33 -0400)
commit33119301bb3efa143ebaaef22a7b5170f14a1331
tree3097d7db5f2defabad7792539a8048f3c95c5c0c
parent657ec85e8733c64b9be2154c3169d31c15a06dce
Implement raiseload for deferred columns

Added "raiseload" feature for ORM mapped columns.

As part of this change, the behavior of "deferred" is now more strict;
an attribute that is set up as "deferred" at the mapper level no longer
participates in an "unexpire" operation; that is, when an unexpire loads
all the expired columns of an object which are not themselves in a deferred
group, those which are mapper-level deferred will never be loaded.

Deferral options set at query time should always be reset by an expiration
operation.

Renames deferred_scalar_loader to expired_attribute_loader

Unfortunately we can't have raiseload() do this because it would break
existing wildcard behavior.

Fixes: #4826
Change-Id: I30d9a30236e0b69134e4094fb7c1ad2267f089d1
22 files changed:
doc/build/changelog/migration_14.rst
doc/build/changelog/unreleased_14/4826.rst [new file with mode: 0644]
doc/build/orm/loading_columns.rst
doc/build/orm/loading_relationships.rst
lib/sqlalchemy/orm/__init__.py
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/base.py
lib/sqlalchemy/orm/descriptor_props.py
lib/sqlalchemy/orm/instrumentation.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/properties.py
lib/sqlalchemy/orm/state.py
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/orm/strategy_options.py
test/ext/test_extendedattr.py
test/orm/test_attributes.py
test/orm/test_deferred.py
test/orm/test_deprecations.py
test/orm/test_expire.py
test/orm/test_mapper.py