Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Reactive)CouchbaseTemplate - removeByQuery always remove all data [DATACOUCH-615] #917

spring-projects-issues opened this issue Sep 21, 2020 · 1 comment


Copy link

@spring-projects-issues spring-projects-issues commented Sep 21, 2020

haal opened DATACOUCH-615 and commented

Using CouchbaseTemplate to remove data by specified query


will always remove all data and ignore query sent in matching part. Same is true for ReactiveCouchbaseTemplate.
Tested with v4.0.4 using Java 11.

Example of JUnit test (in class CouchbaseTemplateQueryIntegrationTests):

void removeByQueryMatching() {
   User user1 = new User(UUID.randomUUID().toString(), "user1", "user1");
   User user2 = new User(UUID.randomUUID().toString(), "user2", "user2");
   User specialUser = new User(UUID.randomUUID().toString(), "special", "special");

   couchbaseTemplate.upsertById(User.class).all(Arrays.asList(user1, user2, specialUser));


   Query nonSpecialUsers = new Query(QueryCriteria.where("firstname").notLike("special"));


   assertNotNull(couchbaseTemplate.findById(User.class).one(specialUser.getId())); //this assert because all data is deleted


Affects: 4.0.4 (Neumann SR4)

Referenced from: pull request #264

Backported to: 4.0.5 (Neumann SR5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants