summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/util.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-10-26 19:25:23 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-10-26 19:25:23 -0400
commitd68bf88fa9147591a245f23562154d9562e4b744 (patch)
tree609931e247dcff1b5f0012b31020afc190e8092b /lib/sqlalchemy/orm/util.py
parent7f043a9666eecdecc54fe779ffdd50a7d5bb0086 (diff)
downloadsqlalchemy-d68bf88fa9147591a245f23562154d9562e4b744.tar.gz
- add class_ to AliasedInsp
- redefine inspect(Class.attrname).parent to be always an inspectable target; either Mapper or AliasedInsp - add most major features to 08 migration, document, link
Diffstat (limited to 'lib/sqlalchemy/orm/util.py')
-rw-r--r--lib/sqlalchemy/orm/util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py
index fb4197c58..cf3238b15 100644
--- a/lib/sqlalchemy/orm/util.py
+++ b/lib/sqlalchemy/orm/util.py
@@ -581,11 +581,20 @@ class AliasedInsp(_InspectionAttr, AliasedInsp):
* ``polymorphic_on`` - an alternate column or SQL expression which
will be used as the "discriminator" for a polymorphic load.
+ .. seealso::
+
+ :ref:`inspection_toplevel`
+
"""
is_aliased_class = True
"always returns True"
+ @property
+ def class_(self):
+ """Return the mapped class ultimately represented by this
+ :class:`.AliasedInsp`."""
+ return self.mapper.class_
inspection._inspects(AliasedClass)(lambda target: target._aliased_insp)