Look here [1] on how to use the IgniteAtomicSequence.
You can set a value for which you want to start counting.
I'm not sure what you are trying to achive? Why not pass the Id to the
query?
cache.query(new SqlFieldsQuery("INSERT INTO CUSTOMER (id, login, email, age)
VALUES (?,?,?,?)")
.setArgs(
ID
,customer.getLogin()
,customer.getEmail()
,customer.getAge()
)
I'm not sure how Ignite should be configured if your database has an
autoincrement field for ID, how this should be implemented in the cache
configuration. Maybe just leave the field ID out from the cacheCofig?
[1] https://apacheignite.readme.io/docs/id-generator
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/How-to-manage-sequence-with-legacy-database-having-auto-increment-id-tp15857p15888.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.