Hmm, I thought I'd read that in the DataNucleus documentation, but I
can't find any clear definition of it.  I must have just assumed
sequences were sequential.

Borrowing from your example here (http://code.google.com/p/datanucleus-
appengine/source/browse/trunk/tests/org/datanucleus/test/
SequenceExamplesJDO.java), it seems if I specify a named sequence and
set SequenceStrategy.CONTIGUOUS (NONCONTIGUOUS might work too, I'm
guessing !TRANSACTIONAL is the key) that I get a monotonically
increasing sequence. Does that seem right?

Thanks for the input,
Philip

On Dec 21, 2:46 pm, "Max Ross (Google)" <[email protected]>
wrote:
> Where are you reading the definition of the contract?
>
>
>
> On Mon, Dec 21, 2009 at 2:41 PM, Philip Tucker <[email protected]> wrote:
> > Thanks!
>
> > Unless I'm misreading the documentation for SEQUENCE, that breaks the
> > contract of the JDP annotation API, doesn't it?
>
> > Is there a way to annotate a field as a true sequence, or do I need to
> > create my own sequence and assign the value myself?
>
> > On Dec 21, 9:29 am, "Max Ross (Google)" 
> > <[email protected]<maxr%[email protected]>
>
> > wrote:
> > > 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/...
>
> > > 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 <[email protected]>
> > 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
> > > > [email protected].
> > > > To unsubscribe from this group, send email to
> > > > [email protected]<google-appengine-java%2B
> > > >  [email protected]><google-appengine-java%2B
> > [email protected]>
> > > > .
> > > > 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
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected]<google-appengine-java%2B 
> > [email protected]>
> > .
> > 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 [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-java?hl=en.


Reply via email to