diff --git a/VERSION b/VERSION index 7da240bd..d5ec45a4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.5.1-stable+timestamp.2013.06.13.15.20.01 +Version 2.5.1-stable+timestamp.2013.06.13.15.30.17 diff --git a/gluon/dal.py b/gluon/dal.py index 9289442d..6f9e95e8 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -5704,8 +5704,9 @@ class MongoDBAdapter(NoSQLAdapter): # silently ignore, only case sensitive # There is a technical difference, but mongodb doesn't support # that, but the result will be the same - return {self.expand(first) : ('/%s/' % \ - self.expand(second, 'string'))} + val = second if isinstance(second,self.ObjectId) else \ + {' $regex':".*" + re.escape(self.expand(second, 'string')) + ".*"} + return {self.expand(first) : val} def LIKE(self, first, second): import re