Done - http://code.google.com/p/googleappengine/issues/detail?id=934

On Dec 1, 10:21 pm, Jeff S <[email protected]> wrote:
> Hi Colin,
>
> It sounds like the best place for this idea is in the issue 
> tracker:http://code.google.com/p/googleappengine/issues/list
>
> Right now the recommended solution is parsing the key out of the
> universally unique key string, as you mentioned.
>
> Happy coding,
>
> Jeff
>
> On Nov 30, 1:03 pm, hawkett <[email protected]> wrote:
>
> > Hi,
>
> > The output of Model (or Expando) to_xml() looks something like below
>
> > <entity kind="MyKind"
> > key="agtkaXNvcy13ZWF3ZXIjCxIFU7NvcGUiC3NlZWRQcm0jZXNzDAsSB0NvdnRleHQYCQw">
> >   <key>tag:app-id.gmail.com,2008-11-30:MyKind
> > [agtkaXNvcy13ZWF3ZXIjCxIFU7NvcGUiC3NlZWRQcm0jZXNzDAsSB0NvdnRleHQYCQw
> > ]</key>
> >   <property name="created" type="gd:when">2008-11-30 19:13:52.477930</
> > property>
> >   <property name="name" type="string">Jerome</property>
> >   <property name="selfRef" type="null"></property>
> >   <property name="otherKindRef" type="key">tag:app-id.gmail.com,
> > 2008-11-30:MyOtherKind
> > [agtkaXNvcy13ZWF3ZXIWDxIFU7NvcGUiC3NlZWRQdm9jZXNzDA
> > ]</property>
> > </entity>
>
> > I've got a couple of problems with this output.
>
> > 1.  The 'key' attribute of the 'entity' element is of one form, and
> > all other keys in the document are of a different form.  Key
> > representation should be consistent, especially considering point 2.
>
> > 2.  I cannot create a Key object using any of the key values in the
> > above (except the 'key' attribute on 'entity' element) without first
> > doing a string manipulation.  Why output a key value that you can't
> > parse?
>
> > And some recommendations
>
> > 1. I'm guessing the longer key form is to conform to the Atom or GData
> > specs (as the docs say)  - i.e. making the key universally unique -
> > even between apps.  If the GAE Data API produces this key
> > representation, then it should also be able to consume this
> > representation.
>
> > 2. If you are going to provide the shorthand for the actual entity
> > (i.e. the 'key' attribute on 'entity' element), you should also
> > provide it for the references.  This would be a workable solution for
> > me - I'm not interested in the universally unique identifier.
>
> > Maybe I've missed an API that lets me create a key without butchering
> > one of those long keys - if you could point me in the right direction
> > that would be great.  Cheers,
>
> > Colin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to