You can allocate keys that are guaranteed to be unique using the DatastoreService class:
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/DatastoreService.html#allocateIds(java.lang.String, long) -- Ikai Lan Developer Programs Engineer, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Fri, Dec 24, 2010 at 9:16 AM, frank <t3devt...@googlemail.com> wrote: > Hello, > > If I understood right I can create a Key for persisting an new entity, > which shall live in a entity group, like this: > > KeyFactory.createKey(parentEntityKey, newEntity.class.getSimpleName(), > 1l)); > > is it possible, that appengine generates the last part (here 1L) of > the key, beause I donĀ“t know, which keys are already in use. > > Tnx > Frank > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to google-appeng...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> > . > 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 google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.