Skip to content

DataSore does not return any result when cursor pointing to entity gets updated but retains its position in list #2427

Description

@tejpratap46

I'm using google datastore to get data of a user:

This is what i'm trying to do:

  1. When data is updated, its updated_at [indexed] property gets set to current timestamp.
  2. I query data on updated_at in ascending order and store cursor returned for later use.
  3. Now user has updated the last entity (which cursor points currently) and no other data is added or updated.
  4. Now i'm expecting that last entity to be returned in next query (using that old cursor) because it was updated and now has a new updated_at timestamp.
  5. But that is not the case, i do not see that (my result is empty list) And now i have lost that update completely because query will return all the other object except that last entity that was updated.
  • I'm is doing something wrong or this is the way it is?
  • If this is natural behaviour then what is preferred way to get that last entity that was updated?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions