Issue with couchbaseTemplate.removeByQuery

deleteAll() won’t work in a transaction because of issue #1745.

deleteById() needs a cas. So you need to pass the whole cusomter entity since it contains the cas. (at least it should - in an @Version property) then -

deleteById(Customer.class).oneEntity(customer).

So when you call in Postman, you first have to fetch the customer so you have the cas. (it’s actually in the metadata of the doc, but spring data couchbase copies it into the @Version property in the entity).