I'm running into an issue with querying the data store. I have a
datastore db.Expando model where some of it's properties are set using
setattr and end up having spaces in there names. Reading, setting and
querying on single word property names is working fine while querying
the data using a multi-word property name in GQL or
Model.all().filter() is broken.
Attempting to filter the results like this:
Model.all().filter('Account Name =', 'Some Name') results in an
exception along the lines of "'NoneType' object has no attribute
'group'" after digging into the app engine source code the regex
patter below is what is stopping the query from working (at a high
level)
...google/appengine/ext/db/__init__.py", line 1980, in filter which
should be a matched group using this Regex from the same file:
_FILTER_REGEX = re.compile('^\s*([^\s]+)(\s+(%s)\s*)?$' %
'|'.join(_OPERATORS), re.IGNORECASE | re.UNICODE)
Is there anyway to filter a query using a multi word property name?
ie: filter('Account Name =', '~').
I have also tried GQL but everything I've tried doesn't help:
SELECT * FROM SomeModel Where 'Account Name' = 'Some Dude' just throws
an error.
any help is appreciated.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.