Hi,

I'm using the low-level DS API, thus short names for kinds, etc, and
my keys are already quite compact. The encoded version is in fact
significantly longer than my own key. So it would optimal, if DS did
not try to second-guess and bloat my PKs. How do you know that DS
doesn't actually store both versions? Do you know how to decode the DS
key?

Regards,
  Viktor


On Jan 5, 5:54 am, jd <jdpatter...@gmail.com> wrote:
> 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 <phrak...@gmail.com> 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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.


Reply via email to