views:

27

answers:

1

I want to build GQL query to get an object using its numeric id. I'm doing this in Datastore viewer in App management console, so I can't use Model.get_by_id(numeric_id). Something like

SELECT * FROM Model WHERE id = <numeric_id>

also doesn't work.

+4  A: 

Try this:

SELECT * FROM Model where __key__ = KEY('Model', <numeric_id>)
Saxon Druce
Thanks, it works!
Pawel Markowski