diff --git a/VERSION b/VERSION index 12a4b69a..43e210ee 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.5.1-stable+timestamp.2013.06.09.16.56.30 +Version 2.5.1-stable+timestamp.2013.06.09.17.00.11 diff --git a/gluon/dal.py b/gluon/dal.py index cd417ebf..4f169cf3 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -1357,7 +1357,8 @@ class BaseAdapter(ConnectionPool): def expand(self, expression, field_type=None): if isinstance(expression, Field): out = '%s.%s' % (expression.tablename, expression.name) - if field_type == 'string': + if field_type == 'string' and not expression.type in ( + 'string','text','json','password'): out = 'CAST(%s AS %s)' % (out, self.types['text']) return out elif isinstance(expression, (Expression, Query)):