From 852e9954aaec7205e7ebaf3d0b232e1e8ff20e63 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 9 Mar 2013 13:24:54 -0500 Subject: A meaningful :attr:`.QueryableAttribute.info` attribute is added, which proxies down to the ``.info`` attribute on either the :class:`.schema.Column` object if directly present, or the :class:`.MapperProperty` otherwise. The full behavior is documented and ensured by tests to remain stable. [ticket:2675] --- lib/sqlalchemy/sql/util.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/sqlalchemy/sql') diff --git a/lib/sqlalchemy/sql/util.py b/lib/sqlalchemy/sql/util.py index fd138cfec..27ba0f95b 100644 --- a/lib/sqlalchemy/sql/util.py +++ b/lib/sqlalchemy/sql/util.py @@ -507,6 +507,9 @@ class AnnotatedColumnElement(Annotated): """pull 'key' from parent, if not present""" return self._Annotated__element.key + @util.memoized_property + def info(self): + return self._Annotated__element.info # hard-generate Annotated subclasses. this technique # is used instead of on-the-fly types (i.e. type.__new__()) -- cgit v1.2.1