[appengine-java] IdGeneratorStrategy.SEQUENCE

2009-12-21 Thread Philip Tucker
I'm using IdGeneratorStrategy.SEQUENCE for the primary key of a table,
but it appears AppEngine bounces between 2 different sequence
generators as I create new entries. IDs are unique, but not
monotonically increasing. It's possible I've coded something wrong,
but I'm oretty sure this is a bug.

--

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-j...@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.




Re: [appengine-java] IdGeneratorStrategy.SEQUENCE

2009-12-21 Thread Max Ross (Google)
Hi Philip,

IdGeneratorStrategy.SEQUENCE support is implemented on top of
DatastoreService.allocateIds(), which is itself the mechanism that the
datastore uses internally to assign ids.  So, all properties of datastore id
allocation apply to SEQUENCE.  There is a lot of good information about
these properties in this thread:
http://groups.google.com/group/google-appengine/browse_thread/thread/dec83c2dbd9542e4

But in short, sequences are guaranteed to be unique but not monotically
increasing.

Hope this helps,
Max

On Mon, Dec 21, 2009 at 12:04 AM, Philip Tucker ptuc...@gmail.com wrote:

 I'm using IdGeneratorStrategy.SEQUENCE for the primary key of a table,
 but it appears AppEngine bounces between 2 different sequence
 generators as I create new entries. IDs are unique, but not
 monotonically increasing. It's possible I've coded something wrong,
 but I'm oretty sure this is a bug.

 --

 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-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.




--

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-j...@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.