Let's say I have the following model:
class Schedule(db.Model):
tripCode = db.StringProperty(required=True)
station = db.ReferenceProperty(Station, required=True)
arrivalTime = db.TimeProperty(required=True)
departureTime = db.TimeProperty(required=True)
And let them say that I have a Station object stored in var foo.
How do I assemble a GQL query that returns all Schedule objects with a link to the Station object that it refers to foo?
This is my best (albeit incorrect ) attempt to form such a request:
myQuery = "SELECT * FROM Schedule where station = " + str(foo.key())
Once again foo- the object Station
source
share