Hi,
Is it possible to do anything with a reference property other than
cycle through the referenced objects in whatever order they are
returned? For example I have a number of reference properties to
instances where the creation date is crucial to how they are
subsequently managed. Is there a way to order the result?
class Reel(db.Model):
name = db.StringProperty()
class Frame(db.Model):
# datetime.datetime.now() when the object is first created.
auto_now_add_prop = db.DateTimeProperty(auto_now_add=True)
# reference to the one and only reel this frame belong to
reel = db.ReferenceProperty(Reel, collection_name='frames')
I would like to order 'reel.frames' depending on the
'auto_now_add_prop' date. Is this the right way to access these
instances if date order access is frequent and crucial?
The Frame model will have millions of instances so a query there
matching for a given Reel instance would be expensive. Ideas/advice/a
thread I haven't seen?
Alex
--
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.