]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- Some refinements to the :class:`.AliasedClass` construct with regards
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 23 Nov 2013 22:03:48 +0000 (17:03 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 23 Nov 2013 22:03:48 +0000 (17:03 -0500)
commitae4629e6a0ff442a819b80f418dee76c25c50938
treec2fccb7619c5ee3bf2a2433f489b54b8ebf2d251
parent6b79d2ea7951abc2bb6083b541db0fbf71590dd3
- Some refinements to the :class:`.AliasedClass` construct with regards
to descriptors, like hybrids, synonyms, composites, user-defined
descriptors, etc.  The attribute
adaptation which goes on has been made more robust, such that if a descriptor
returns another instrumented attribute, rather than a compound SQL
expression element, the operation will still proceed.
Addtionally, the "adapted" operator will retain its class; previously,
a change in class from ``InstrumentedAttribute`` to ``QueryableAttribute``
(a superclass) would interact with Python's operator system such that
an expression like ``aliased(MyClass.x) > MyClass.x`` would reverse itself
to read ``myclass.x < myclass_1.x``.   The adapted attribute will also
refer to the new :class:`.AliasedClass` as its parent which was not
always the case before. [ticket:2872]
doc/build/changelog/changelog_09.rst
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/util.py
test/orm/test_froms.py
test/orm/test_of_type.py
test/orm/test_query.py
test/orm/test_utils.py