Try:
SELECT * from DB WHERE __key__ = KEY('1')
You can find more documentation on this here:
http://code.google.com/appengine/docs/python/datastore/gqlreference.html
--
Ikai Lan
Developer Programs Engineer, Google App Engine
Blogger: http://googleappengine.blogspot.com
Reddit: http://www.reddit.com/r/appengine
Twitter: http://twitter.com/app_engine
On Sun, Jan 23, 2011 at 2:00 PM, <[email protected]> wrote:
> Hi all,
>
> I'm pretty new using GQL so hopefully someone can help me solving this easy
> (?) problem.
>
> I store my Entities in the DB using datastore.put( Entity ) without using
> an ID. But if I look at the Datastore Viewer I see that these entities are
> stored with an unique id called *ID/Name*. Now I'm trying to load such an
> entity using this code:
>
> SELECT * from DB WHERE ID/Name = 'id=1' <- Error
> SELECT * from DB WHERE ID = 'id=1' <- empty resultset
> SELECT * from DB WHERE Name = 'id=1' <- empty resultset
> SELECT * from DB WHERE ID/Name = '1' <- Error
> SELECT * from DB WHERE ID = '1' <- empty resultset
> SELECT * from DB WHERE Name = '1' <- empty resultset
>
> Can anybody tell me what to use to get this entry?
>
> Thanks in advance!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-appengine-java%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" 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-java?hl=en.