Skip to content

paging doesn't work with DynamicProxy - gives NoSuchMethodError if args to exactly match. #1818

@mikereiche

Description

@mikereiche

paging doesn't work with DynamicProxy - gives NoSuchMethodError
the parameters in the method definition and the arguments must have the exact same type (i.e. Collection color and LinkedListiatas apparently do not work. I don't know why this only seems to be an issue here.

public interface AirportRepository extends CouchbaseRepository<Airport, String>, DynamicProxyable<AirportRepository> {

	@ScanConsistency(query = QueryScanConsistency.REQUEST_PLUS)
	List<Airport> findByIataInAndIcaoIn(java.util.LinkedList<String> size, java.util.LinkedList<String> color,
			PageRequest pageable);
CouchbaseRepositoryQueryIntegrationTests
@Test
	void issue1304CollectionParameter() {
		Airport vie = null;
		try {
			vie = new Airport("airports::vie", "vie", "low5");
			airportRepository.withScope("_default").save(vie);
			java.util.LinkedList<String> iatas = new LinkedList<String>();
			iatas.add(vie.getIata());
			java.util.LinkedList<String> icaos = new LinkedList<String>();
			icaos.add(vie.getIcao());
			icaos.add("blue");
			PageRequest pageable = PageRequest.of(0, 1, Sort.by("iata"));
			List<Airport> airports = airportRepository.findByIataInAndIcaoIn(iatas, icaos, pageable);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions