Question

Here is an example of a record I am trying to write a GQL Admin Console query for (not Python).

Decoded entity key:

packageName: name=com.mycompany.example > userId: name=someone@gmail.com
Entity key: ag...Qw

I've already tried:

SELECT * FROM userId where __key__ = KEY('userId', 'someone@gmail.com')

This does not find the record. I suspect this is due to the userId being a child under packageName... How do I write a GQL query for this?

Was it helpful?

Solution

Try this:

SELECT * FROM userId WHERE __key__ = KEY('packageName', 'com.mycompany.example', 'userId','someone@gmail.com')
>     // SELECT * FROM ChildClassName WHERE __key__ = KEY('ParentClassName', 'ParentName, 'ChildClassName', 'ChildName'))

See the info about the Key class for more details.

hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top