Timm
Timm

Reputation: 12753

Delete entities from a datastore table without knowing ancestor

Is it possible to delete entities from a datastore table without knowing their ancestor? I wish to delete all entities older than a specific date, but there are many different ancestors.

Upvotes: 1

Views: 86

Answers (1)

dragonx
dragonx

Reputation: 15143

Provided you have indexed them to be queried by date, you can query the entities by date.

The query will return the entities of interest. You can find out the ancestor of a given entity from its key - the ancestor's key is part of the entity's key.

Upvotes: 2

Related Questions