Issue with couchbaseTemplate.removeByQuery

Hi Rosario -

First make sure you are running the latest version of spring-data-couchbase. The issue you have looks exactly like scope and collection annotations on repository are not considered during execution. · Issue #1441 · spring-projects/spring-data-couchbase · GitHub

It’s difficult to determine exactly what occurred without your configuration class, the repository class and the entity class (Customer). There are a number of possibilities - they are outlined in the various links I provided in your other post - especially those on scopes and collections.

A ‘keyspace’ as mentioned in the error message is either a bucket (when not using scopes and collections), or a collection (when using scopes and collections).

At the bottom of the issue is a query like “delete from customer …” being sent to the server without a query_context (which would specify the bucket and collection). So it appears that somewhere you have defined an @Collection(“customer”) , and the query is being constructed with that keyspace - but the corresponding query_context (which specifies the bucket and scope) is not being sent - because your Configuration does not specify a scope (@Override getScopeName())