Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Issues with Datastore deleteBy methods #2169

Closed
Alos opened this issue Feb 3, 2020 · 0 comments · Fixed by #2177
Closed

Issues with Datastore deleteBy methods #2169

Alos opened this issue Feb 3, 2020 · 0 comments · Fixed by #2177
Assignees
Labels
datastore GCP Datastore P1

Comments

@Alos
Copy link

Alos commented Feb 3, 2020

Describe the bug
Using Spring Cloud GCP 1.2.1.RELEASE the following method is not implemented:

 void deleteAlertByCreatedDateBefore(Instant createdDate);

Using this method produces the following error:

org.springframework.cloud.gcp.data.datastore.core.mapping.DatastoreDataException: Unsupported predicate keyword: BEFORE (1): [IsBefore, Before]

In addition:

void deleteByCreatedDateLessThan(Instant createdDate);

Works but it only deletes one entity from datastore. The following correctly removes all the entities that match the query:

int deleteByCreatedDateLessThan(Instant createdDate);

The returned int contains the count of the entities removed. I'm not quite sure if this is expected or we are just using it wrong.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
datastore GCP Datastore P1
Development

Successfully merging a pull request may close this issue.

3 participants