开发者

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

开发者 https://www.devze.com 2023-03-26 13:36 出处:网络
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 开发者_如何学Pythonserver can fetch all e

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 开发者_如何学Pythonserver 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?


No, IDs do not increase monotonically.

Consider synchronizing based on a create/update timestamp.

0

精彩评论

暂无评论...
验证码 换一张
取 消