]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Implement relationship to AliasedClass; deprecate non primary mappers
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 30 Dec 2018 01:54:29 +0000 (20:54 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 25 Jan 2019 14:28:28 +0000 (09:28 -0500)
commit93855ed623ceedffc02dee06c9a46c37dd26286b
tree5fdb783ea642d99693fd284dcbc04d4691423d16
parent78e598e3a5b8df7419a600c291f90260e598c9b7
Implement relationship to AliasedClass; deprecate non primary mappers

Implemented a new feature whereby the :class:`.AliasedClass` construct can
now be used as the target of a :func:`.relationship`.  This allows the
concept of "non primary mappers" to no longer be necessary, as the
:class:`.AliasedClass` is much easier to configure and automatically inherits
all the relationships of the mapped class, as well as preserves the
ability for loader options to work normally.

- introduce new name for mapped_table, "persist_selectable".  this is
the selectable that selects against the local mapper and its superclasses,
but does not include columns local only to subclasses.

- relationship gains "entity" which is the mapper or aliasedinsp.

- clarfiy name "entity" vs. "query_entity" in loader strategies.

Fixes: #4423
Fixes: #4422
Fixes: #4421
Fixes: #3348
Change-Id: Ic3609b43dc4ed115006da9ad9189e574dc0c72d9
30 files changed:
doc/build/changelog/migration_13.rst
doc/build/changelog/unreleased_13/4423.rst [new file with mode: 0644]
doc/build/orm/join_conditions.rst
lib/sqlalchemy/ext/declarative/base.py
lib/sqlalchemy/orm/descriptor_props.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/relationships.py
lib/sqlalchemy/orm/session.py
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/orm/strategy_options.py
lib/sqlalchemy/orm/util.py
test/aaa_profiling/test_memusage.py
test/ext/test_deprecations.py [new file with mode: 0644]
test/ext/test_mutable.py
test/orm/test_ac_relationships.py [new file with mode: 0644]
test/orm/test_deprecations.py
test/orm/test_eager_relations.py
test/orm/test_froms.py
test/orm/test_inspect.py
test/orm/test_joins.py
test/orm/test_lazy_relations.py
test/orm/test_mapper.py
test/orm/test_rel_fn.py
test/orm/test_selectable.py
test/orm/test_selectin_relations.py
test/orm/test_subquery_relations.py
test/orm/test_unitofwork.py
test/requirements.py