fixed Issue 1526:MongoDBAdapter contains() doesn't work for list:reference types, thanks schlegel
This commit is contained in:
@@ -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
|
||||||
|
|||||||
+3
-2
@@ -5704,8 +5704,9 @@ class MongoDBAdapter(NoSQLAdapter):
|
|||||||
# silently ignore, only case sensitive
|
# silently ignore, only case sensitive
|
||||||
# There is a technical difference, but mongodb doesn't support
|
# There is a technical difference, but mongodb doesn't support
|
||||||
# that, but the result will be the same
|
# that, but the result will be the same
|
||||||
return {self.expand(first) : ('/%s/' % \
|
val = second if isinstance(second,self.ObjectId) else \
|
||||||
self.expand(second, 'string'))}
|
{' $regex':".*" + re.escape(self.expand(second, 'string')) + ".*"}
|
||||||
|
return {self.expand(first) : val}
|
||||||
|
|
||||||
def LIKE(self, first, second):
|
def LIKE(self, first, second):
|
||||||
import re
|
import re
|
||||||
|
|||||||
Reference in New Issue
Block a user