fixed issue 1570:Recent web2py does no longer support table-aliasing, thanks Dominic

This commit is contained in:
mdipierro
2013-07-02 07:17:37 -05:00
parent c633ab450a
commit a449c4ede5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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'])