I'm not sure I understand your example. The way you set it up here, select * from Location where birthplace = whatever returns a set of Location objects, each of which has a property with the key of a Person entity that you're looking for. You can access each Person object simply by referencing location.name, e.g. location.name.name for the Person's StringProperty. The first time you reference the Person object for the property, the full entity is fetched from the datastore. Does that meet your needs?
-- Dan On Mon, Feb 9, 2009 at 9:27 PM, adelevie <[email protected]> wrote: > > I know the datastore is not relational but this should still be > simple. > > I have two models: > > class Person(db.Model): > name = db.StringProperty() > > class Location(db.Model): > birthplace = db.StringProperty() > name = db.ReferenceProperty() > > So I want to be able to select all People given a birthplace. I tried > messing with keys, but to no avail. > > thanks, > Alan > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
