jmix
jmix copied to clipboard
JmixDataRepository: Cannot create method with both @Query and FetchPlan parameter
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