On Sat, Nov 28, 2009 at 10:09 PM, MajorProgamming wrote: > I was wondering: isn't using reference properties a waste of space? > Wouldn't it make more sense to store the id (assuming not using > key_name) of the entity. After all, if the Kind is known, one can > easily generate the full key based on that. And with a reference > property it actually stores the _entire_ key (very long!).
Storing the key or the full path is the only way to retrieve *any* entity. Why? Because you can't generate a full key for an entity that has ancestors using only a key name or id. You need the full path of ancestor entities. The key is the full path encoded. For simple and common cases (entity with no ancestor), you can surely store simply the id or key name. But you have to keep in mind that this won't work for any possible entity (if you store an entity with ancestor, you can't retrieve it back). -- rodrigo -- 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-appeng...@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.