I am using Google AppEngine (Java) and would like to have the primary key to be auto incrementing, preferably increasing by 1.
IdGeneratorStrategy.INCREMENT
seems to be not supported in AppEngine.
Is IdGeneratorStrategy.SEQUENCE
what I need?
I am using Google AppEngine (Java) and would like to have the primary key to be auto incrementing, preferably increasing by 1.
IdGeneratorStrategy.INCREMENT
seems to be not supported in AppEngine.
Is IdGeneratorStrategy.SEQUENCE
what I need?
Auto-incrementing IDs does not work on App Engine because of the way App Engine stores your data spread across multiple servers and potentially data centers.
You can simulate an auto-incrementing ID, but honestly, there is probably no good reason for needing one.
If unique IDs are what you need, those are the default. If you need to know how many rows have been created, that's also easy.