Hi
I have the below class in my project, executing below method throws, though I have Flux and not Mono in my return type.
If the query returns only 1 document it works, but fails when query returns more than a single document.
Have anyone faced such issue with this version of spring data couchbase?
java.lang.IndexOutOfBoundsException: Source emitted more than one item
at reactor.core.publisher.MonoSingle$SingleSubscriber.onNext(MonoSingle.java:136) ~[reactor-core-3.4.1.jar:3.4.1]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
@Repository
public interface PolicySnapshotCBRepository extends ReactiveSortingRepository<PolicySnapshot, String> {
@Query("#{#n1ql.selectEntity} WHERE #{#n1ql.filter} AND entity.state = $1 "
+ "AND ANY type IN entity.applicableEntities SATISFIES type IN $2 END ")
Flux<PolicySnapshot> findAllPoliciesByApplicableTypes(String state, JsonArray applicableTypes);
}