Audrey,

If for some reason, you need to use GQL to lookup by key string
instead of using get() like Bryan suggested, you can use KEY
('mykeystring') instead of the raw string on the right-hand side of
your __key__ comparison.  Full documentation is here:
http://code.google.com/appengine/docs/python/datastore/gqlreference.html

While the above works in code and the shell, it doesn't seem to work
in the Data Viewer.  I have entered an issue for this here:
http://code.google.com/p/googleappengine/issues/detail?id=1105

-Bill

On Feb 26, 6:21 pm, Audrey M Roy <audr...@gmail.com> wrote:
> How do I write a GQL query that's something like this...
>
> SELECT * FROM Pet WHERE __key__='mykeystring'
>
> the above returns the error BadFilterError: invalid filter: __key__
> filter value must be a Key; received mykeystring (a unicode).
>
> Audrey
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to