]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- refactor of pathing mechanics, to address #2614, #2617
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 2 Dec 2012 01:12:23 +0000 (20:12 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 2 Dec 2012 01:12:23 +0000 (20:12 -0500)
commitb66dad46f31961ad9f2271e6dae377e38fc67979
treea3925db6a95a12334548916aa01f51f5ea8107ae
parent65dd01233f757e70aa9c7a8b5f92386ac066a46c
- refactor of pathing mechanics, to address #2614, #2617
- paths now store Mapper + MapperProperty now instead of string key,
so that the parent mapper for the property is known, supports same-named
properties on multiple subclasses
- the Mapper within the path is now always relevant to the property
to the right of it.  PathRegistry does the translation now, instead
of having all the outside users of PathRegistry worry about it,
to produce a path that is much more consistent.  Paths are now
consistent with mappings in all cases.  Special logic to get at
"with_polymorphic" structures and such added also.
- AliasedClass now has two modes, "use_mapper_path" and regular;
"use_mapper_path" is for all those situations where we put an AliasedClass
in for a plain class internally, and want it to "path" with the
plain mapper.
- The AliasedInsp is now the first class "entity" for an AliasedClass,
and is passed around internally and used as attr._parententity
and such.  it is the AliasedClass analogue for Mapper.
19 files changed:
doc/build/changelog/changelog_08.rst
lib/sqlalchemy/ext/serializer.py
lib/sqlalchemy/orm/interfaces.py
lib/sqlalchemy/orm/loading.py
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/query.py
lib/sqlalchemy/orm/strategies.py
lib/sqlalchemy/orm/util.py
test/aaa_profiling/test_memusage.py
test/orm/inheritance/test_polymorphic_rel.py
test/orm/inheritance/test_relationship.py
test/orm/inheritance/test_single.py
test/orm/test_eager_relations.py
test/orm/test_inspect.py
test/orm/test_joins.py
test/orm/test_mapper.py
test/orm/test_query.py
test/orm/test_subquery_relations.py
test/orm/test_utils.py