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's say I have a Station object stored in the var foo
.
How do I assemble a GQL query that returns all Schedule objects with a reference to the Station object referenced by foo
?
This is my best (albeit incorrect) attempt to form such a query:
myQuery = "SELECT * FROM Schedule where station = " + str(foo.key())
Once again foo
is a Station object