Perhaps you may keep it in another model. class BigModel(db.Model): ... class KeyModel(db.Model): key = db.ReferenceProperty(BigModel)
# do below in a transaction bigEntity = BigModel() ... bigEntity.put() KeyModel(key=bigEntity.key()).put 2009/4/17 mbac...@googlemail.com <mbac...@googlemail.com> > > Thanks Jeff. :) > > 风笑雪, memcache is no solution in this case, but thanks anyway. > > I also want to keep the overhead as low as possible, because I am > already storing a lot of text data inside the datastore. Therefore I > don't want to have another Kind that just handles the list of > available links if the information is already in the original Kind. > > Best regards, > Marc > > On 15 Apr., 23:40, "Jeff S (Google)" <j...@google.com> wrote: > > Just an FYI, the ability to fetch just the keys for entities which match > a > > query (instead of fetching the full entity) is a feature request which is > on > > our radar. > > > > Good question, > > > > Jeff > > > > On Wed, Apr 15, 2009 at 7:57 AM, 风笑雪 <kea...@gmail.com> wrote: > > > No you can't. > > > The entity stores as a pair of (key: value). You can only get both of > them > > > at a same time. > > > > > I suggest you use a memcache: > > > > > index = memcache.get('index') > > > if not index: > > > index = [] > > > result = query.fetch(15) # maybe you need do it several times > > > index.append([e.key() for e in result]) # maybe you need > > > append several times > > > memcache.set('index', index) > > > > > 2009/4/15 mbac...@googlemail.com <mbac...@googlemail.com> > > > > >> Hello everyone, I would like to ask if there is any way to fetch only > > >> db.Key objects from a db.Query. I want to generate a list of links (a > > >> Google sitemap) that point to the place there all the data is shown. > > >> All the information to generate the link is part of the key name and > > >> therefore fetching hundreds of db.Model instances is not needed. > > >> Currently I can fetch around 15 instances, because of the datastore > > >> timeout limits. I am already using sitemapindexe's to split my sitemap > > >> into multiple HTTP requests, but I still need to fetch more than those > > >> ~15 key names to display all links. > > > > >> Any ideas? Thanks in advance. > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---