Hi Jaap,
You don't need to do a query in order to get elements with a given name or
ID - just use MyModel.get_by_id, MyModel.get_by_key_name, or MyModel.get().

-Nick Johnson

On Mon, Sep 28, 2009 at 7:05 AM, Jaap <[email protected]> wrote:

>
> Hi
>
> My data has a unique ID for every record so I thought I use that for
> the primary key for the datastore. When I look on the appengine
> dashboard I see that the primary key column has as header Name/ID. How
> can I run an GQL query on this to get a record that has a certain Name/
> ID
>
> The object I store is called CountryIP. So I'd expect that something
> like this would work:
> SELECT * FROM CountryIP WHERE ID=33996344   (returns empty set)
> SELECT * FROM CountryIP WHERE Name/ID=33996344 (returns an error)
> SELECT * FROM CountryIP WHERE Name=33996344 (returns empty set)
>
> Any idea what I should do or should I never use the primary key for a
> query?
>
> Thanks
>
> Jaap
>
> >
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to