Thanks Nacho.  I asked the same question in google appengine chat irc
and got the same answer.  Will have to use the allocate id feature in
low level api.

Len

On Oct 21, 7:41 am, Nacho Coloma <icol...@gmail.com> wrote:
> Maybe what you are looking for is DatastoreService.allocateIds().
>
> On Oct 21, 9:35 am, leszek <leszek.ptokar...@gmail.com> wrote:
>
>
>
> > You hit the nail on the head. As far as I know there is nothing like
> > "sequence" in Google App Engine. Either you need to have another
> > entity with a counter and increase it in transactional way. Or you can
> > use memcache.
>
> >http://code.google.com/intl/pl/appengine/docs/java/javadoc/com/google...
>
> > There is a method:
> > --------
> > java.lang.Long  increment(java.lang.Object key, long delta)
> >           Atomically fetches, increments, and stores a given integral
> > value.
> > -------
>
> > Pay attention to "atomically". May be this can be used for generating
> > sequential and avoid bottleneck in the case of datastore entity and
> > additional transaction. But because of the risk of memcache expiring
> > this method needs some more elaboration.- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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-java@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