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'
}
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
SpringDataMethodInconsistencyInspection- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Suppressing Inspection
You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:
//noinspection SpringDataMethodInconsistencyInspection
More detailed instructions as well as other ways and options that you have can be found in the product documentation:
Inspection Details | |
|---|---|
By default bundled with: |
Last modified: 18 September 2025