The encoded "Entity Key" is a representation that includes your key
name, entity kind, ancestors and app id - encoded into a form that is
safe to use in urls etc.  Keeping your keys small and kinds small
(i.e. using short class names) will reduce storage space of keys in
the DS.  In Twig (i.e. not JDO) you can keep the names of your classes
as you like and then override typetoKind(Type) to return abbreviated
names.  I found that this saves a significant amount of space in my
app that has many relations between entities.

http://code.google.com/p/twig-persist/

On Jan 4, 5:01 pm, phraktle <[email protected]> wrote:
> Hi,
>
> I'm generating my own entity keys, with new Entity("Foo", "myId"). I
> noticed that in the DataStore viewer, these entities still seem to
> have a default key:
>
> Decoded entity key: Foo: name=myId
> Entity key:
> ahFzY2FyYWJyZWNvbW1lbmRlcnJACxIVUHJvZHVjdFJlY29tbWVuZGF0aW9uIiU1OTg1MEMzMzM 
> wOUZGRjV8MjAxMDAxMDQwMTAzNTN8cHJvZF8wDA
>
> So the "Entity key" here still seems to be generated by GAE. Why is
> this needed? I do have a primary key already. So does it get stored as
> simply another indexed column? Does this impact storage space too? I
> don't need the GAE entity key at all, and would prefer not having to
> pay for its storage either :)
>
> Thanks,
>   Viktor

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-java?hl=en.


Reply via email to