Spring data JPA delete all returns void but generated query has returning claus


Using Spring data reactive couchbase delete all method. The method output is Mono void but the generated query has returning clause. if output is void believe there is no need of returning clause.


Hi @mahendravarman -

What you will need to do is define your own method as below. The name must NOT begin with ‘delete’ (otherwise it will return a Mono RemoveResult instead of Mono User

@Query("#{#n1ql.delete} WHERE meta().id=$1 #{#n1ql.returning}")
    Mono<User> myDeletedById(String id);


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.