Re: [appengine-java] Generating Keys

2010-02-08 Thread Manny S
John, Thanks a bunch. Here is the reason why I need to add a prefix to the key. The scenario - I will be implementing pagination (of the data returned) as described in and for the sort order I wanted to use the Key. However, if the key also has the date of creation embedded in it then the sort

Re: [appengine-java] Generating Keys

2010-02-08 Thread John Patterson
You could use DatastoreService.allocateIds() But why would you want to do this? If its to make the ids look nice then you could just add and remove the string yourself before looking up the key. Probably better to have a date property rather than include it in the key. On 8 Feb 2010, at

[appengine-java] Generating Keys

2010-02-07 Thread Manny S
First off thanks for your time. I would like to generate a key that is a concatenation of a string with an datastore generated key. Is there anyway to do that? I want my keys to be "appname" + datastore generated key or say generate a key that is currentdate + datastore generated key Any sugges