If shape details are needed in db query, I think you may just save a pickle dump of the shape object as a blob field.
On Oct 13, 6:45 am, djidjadji <[EMAIL PROTECTED]> wrote: > And you need multiple queries to get all the Shapes that belong to the Page. > When we make a new Shape subclass we have to update the retrieval in > the Page too. > > I just read about the entity-index-limit > athttp://code.google.com/appengine/docs/datastore/queriesandindexes.html > When a Page has a lot of shapes (many items in the ListProperty) it could > happen that the entity is not stored because we hit this limit. > > A possible solution is that we give the Shape a Reference to an > implementation. > The implementation attribute points to a Line or Circle object. > --------------- > class ShapeProxy(db.Model): > onPage = db.ReferenceProperty(Page,collection_name="shapes",required=True) > implementation = db.ReferenceProperty(collection_name="imp",required=True) > def draw(self): > return self.implementation.draw() > > class Shape(db.Model): > color = db.StringProperty(required=True,default='black') > def draw(self): > return '' > > # creation has to change too > --------------- > When retrieving shapes it might be better to collect the keys of the > implementations first, > then do a dg.get(shapeKeys) and then draw the Shapes. > For this method we have 2 objects for every Shape that we use. > > Is there another method to prevent this entity-index-limit? > > 2008/10/13 djidjadji <[EMAIL PROTECTED]>: > > > But this will give you VERY large entity groups and that is not very > > efficient for updates (transactions) > > > 2008/10/13 yejun <[EMAIL PROTECTED]>: > > >> Using parent = or ancestor is probably faster because the locality of > >> datastore. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---