0

I am using java,Datanucleus,mongodb and JDO in my project.

I have a requirement where I should generate sequence number and store it in DB. I was going through various links and found that DataNucleus supports the automatic assignment of sequence values for object identities only for the following datastore:-

Oracle
PostgreSQL
SAP DB
DB2
Firebird
HSQLDB
H2
Derby (from v10.6)
DB4O

So does that mean -> sequence generation can't be done for mongoDB? If it can be then please provide some useful link or guidance !

Note:I am already aware of the fact that mongoDB creates an object id on its own..but I want custom sequence number generation,store it in DB and use it.

4

1 回答 1

0

DataNucleus-MongoDB 支持“INCREMENT”值策略,文档中非常清楚地说明了这一点,此外还支持许多其他策略。

于 2012-12-06T14:43:23.710 回答