jmix icon indicating copy to clipboard operation
jmix copied to clipboard

JmixDataRepository: Cannot create method with both @Query and FetchPlan parameter

Open nekogochan opened this issue 2 years ago • 0 comments

I have repository (full code of test project will aviliable on github link below):

public interface AnimalRepository extends JmixDataRepository<Animal, UUID> {
    List<Animal> findByZoo(Zoo zoo, FetchPlan fetchPlan);

    @Query("where e.zoo.name = :zooName")
    List<Animal> findByZooName(String zooName, FetchPlan fetchPlan);
}

When try to compile programm get error (full stacktrace will given in attachment 'stacktrace.txt'):

Parameter fetchPlan of method com.company.jmixrepotest.repository.AnimalRepository#findByZooName does not included to query "where e.zoo.name = :zooName"

I think this is strange behavior, since passing the parameter of FetchPlan type to a method without the annotation @Query works without errors

stacktrace.txt github link to test project

nekogochan avatar Sep 05 '22 16:09 nekogochan