Hi Yohan, There's still no need to generate encoded keys on the client - or send them to the client at all. Just generate the key name, and since you should already know the kind and any parents from context, the server can create the key from the key name.
-Nick Johnson On Mon, Jun 20, 2011 at 10:27 AM, Yohan <[email protected]> wrote: > Hi Robert, > > I'd like to avoid that AJAX roundtrip ;). I will translate the source > into JS. > > Thanks for pointing that out. > > Cheers, > > On 19 juin, 04:25, Robert Kluin <[email protected]> wrote: > > The SDK is open source, so yes. However, there is no need to generate > the > > encoded key on the client. Why not just generate a GUID and use that as > the > > key name? Or, setup an API in your app that you make an AJAX call to > that > > returns a key for you? > > > > If you are still interested in the code: > http://code.google.com/p/googleappengine/source/browse/#svn%2Ftrunk%2... > > > > Robert > > On Jun 19, 2011 4:18 AM, "Yohan" <[email protected]> wrote:> Hi > Guys, > > > > > I've been trying to generate a valid datastore Key manually in > > > javascript. For some reason, i need the javascript to know the keys of > > > the objects the server will generate before sending the request to the > > > server (as long as both JS and Servlet generate the keys the same > > > way). > > > > > I couldn't find anywhere in the doc how the keys are generated. I > > > tried decoding the keys but it includes a few binary data that changes > > > depending on keys parents and stuff. > > > > > Could we have access to the keys generation algorithm ? > > > > > Thanks > > > > > -- > > > 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. > > -- > 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. > > -- Nick Johnson, Developer Programs Engineer, App Engine -- 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.
