> > Hi all
> > For a data model class say
> > Person with certain fields,
> > how can i access the unique numeric ID field associated with each
> > entity in query?
> > I use
> > persons=db.GqlQuery('SELECT __key__ FROM Person')
> > for p in persons:
> >   self.response.out.write(how to print the ID field here)
>
> self.response.out.write(p.key().id())
>
You should also replace 'SELECT __key__' with 'SELECT *' in your GQL,
you cannot select individual properties.

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