Hi Aswath,

Unfortunately there is no way to guarantee the assignment of sequential ids
using JDO on App Engine, or even using the low-level datastore api.  This is
because ids are allocated in batches across many datastore backends, and one
request to get the next id may hit one backend while another may hit a
different backend.  Is sequential ids a hard requirement?

Max

On Tue, Feb 9, 2010 at 8:27 PM, aswath satrasala <[email protected]
> wrote:

> Hello Max,
> I am planning to use IdGeneratorStrategy.INCREMENT feature to assign
> sequential ids for entities I am creating.  for example, Employee.
>
> -Aswath
>
> On Wed, Feb 10, 2010 at 5:49 AM, Max Ross (Google) <
> [email protected] <maxr%[email protected]>> wrote:
>
>> JDO Sequences work, we just haven't publicized them.  The DataNucleus docs
>> should tell you everything you need to know:
>> http://www.datanucleus.org/products/accessplatform/jdo/sequences.html
>>
>> IdGeneratorStrategy.INCREMENT is not yet implemented.  What are you
>> looking to use it for?
>>
>> Max
>>
>>
>> On Mon, Feb 8, 2010 at 3:20 AM, Vincent TELLIER <
>> [email protected]> wrote:
>>
>>> I tried the incrementation, but I got an error saying that it was not
>>> implemented in the appengine datastore.
>>>
>>>
>>> TELLIER Vincent
>>> + Email : [email protected]
>>> + Contact messenger (msn) : [email protected]
>>>
>>>
>>> 2010/2/8 aswath satrasala <[email protected]>
>>>
>>> See if the following annotation help you.
>>>> @Persistent(valueStrategy = IdGeneratorStrategy.INCREMENT)
>>>>
>>>> -Aswath
>>>>
>>>>
>>>> On Mon, Feb 8, 2010 at 1:18 AM, datanucleus 
>>>> <[email protected]>wrote:
>>>>
>>>>> What getNextID feature on JDO ? i.e please make reference to the JDO
>>>>> API and which particular API Method you're referring to
>>>>>
>>>>> --
>>>>> 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%[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%[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%[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%[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%[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