summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-04-29 22:26:39 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-04-29 22:26:39 +0000
commit146e0515d8c8f991857fb3cf27a6b9a5583d25d1 (patch)
tree4948f1b6f1efae8a8678d7834b335ff13a6b5140 /lib/sqlalchemy/sql.py
parent8d5a0729abff9fe4ac86f49d810564037a68b0e3 (diff)
downloadsqlalchemy-146e0515d8c8f991857fb3cf27a6b9a5583d25d1.tar.gz
- restored old "column_property()" ORM function (used to be called
"column()") to force any column expression to be added as a property on a mapper, particularly those that aren't present in the mapped selectable. this allows "scalar expressions" of any kind to be added as relations (though they have issues with eager loads).
Diffstat (limited to 'lib/sqlalchemy/sql.py')
-rw-r--r--lib/sqlalchemy/sql.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql.py b/lib/sqlalchemy/sql.py
index a7ca55e31..6858084de 100644
--- a/lib/sqlalchemy/sql.py
+++ b/lib/sqlalchemy/sql.py
@@ -1617,7 +1617,7 @@ class FromClause(Selectable):
if not raiseerr:
return None
else:
- raise exceptions.InvalidRequestError("Given column '%s', attached to table '%s', failed to locate a corresponding column from table '%s'" % (str(column), str(column.table), self.name))
+ raise exceptions.InvalidRequestError("Given column '%s', attached to table '%s', failed to locate a corresponding column from table '%s'" % (str(column), str(getattr(column, 'table', None)), self.name))
def _get_exported_attribute(self, name):
try: