Inspectopedia Help

Spring Data repository method errors

Reports Spring Data CRUD repository methods for which the Spring Data Query builder cannot generate the corresponding query.

Example:

interface PersonRepository extends Repository<Person, Long> { List<Person> findByEmailAddressAndLastname(EmailAddress emailAddress, String lastname); List<Person> findByEmailUnknownAndLastname(EmailAddress emailAddress, String lastname); // Cannot resolve property 'Unknown' List<Person> findByAndLastname(EmailAddress emailAddress, String lastname); // Missing property name List<Person> findDistinctPeopleByLastnameOrFirstname(String lastname, String firstname); List<Person> findPeopleDistinctByUnknownOrFirstname(String lastname, String firstname); // Cannot resolve property 'Unknown' List<Person> findByLastnameOrderByFirstnameAsc(String lastname); List<Person> findByLastnameOrderByUnknownDesc(String lastname); // Cannot resolve property 'Unknown' }

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Spring Data, 241.16690

Last modified: 29 April 2024