Does datastore run query for Instructor each time? Or does it some
sort of cache thing?
If I have these models:
class Instructor(db.Model)
firstName = db.StringProperty()
lastName = db.StringProperty()
class Participant(db.Model)
firstName = db.StringProperty()
lastName = db.StringProperty()
workshop = db.ReferenceProperty(Workshop, collection_name = "participants")
class Workshop(db.Model)
instructor = db.ReferenceProperty(Instructor)
Then if I do the following,
workshop = Workshop.all().get()
for participant in workshop.participants:
someMethod(workshop, participant)
def someMethod(self, workshop, participant)
if (workshop.instructor... # does it run query every time or does it cache?
If datastore queries Instructor every time when I do
workshop.instructor, I thought I should pass instructor as an
argument.
Shinichi
--
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.