thejaz
thejaz

Reputation: 2773

Does ID always increase when adding new objects to GAE Datastore?

I'm building an client/server-app where I want to sync data. I'm thinking about including the largest key from the local client database in the query so the server can fetch all entities added after that entity (with key > largest_local_key).

  1. Can I be sure that the Google App Engine always increase the ID of new entities?
  2. Is that a good way to implement synchronization?

Upvotes: 1

Views: 139

Answers (1)

Drew Sears
Drew Sears

Reputation: 12838

No, IDs do not increase monotonically.

Consider synchronizing based on a create/update timestamp.

Upvotes: 2

Related Questions