From a449c4ede58bef15c6d81115e03ead5df06fa2d8 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 2 Jul 2013 07:17:37 -0500 Subject: [PATCH] fixed issue 1570:Recent web2py does no longer support table-aliasing, thanks Dominic --- VERSION | 2 +- gluon/dal.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 27121973..942e1cb1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.6.0-development+timestamp.2013.07.01.05.51.11 +Version 2.6.0-development+timestamp.2013.07.02.07.16.53 diff --git a/gluon/dal.py b/gluon/dal.py index 6c184b18..b8396be0 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -1364,7 +1364,7 @@ class BaseAdapter(ConnectionPool): def expand(self, expression, field_type=None): if isinstance(expression, Field): - out = '%s.%s' % (expression.table, expression.name) + out = '%s.%s' % (expression.table._tablename, expression.name) if field_type == 'string' and not expression.type in ( 'string','text','json','password'): out = 'CAST(%s AS %s)' % (out, self.types['text'])