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.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Spring Data, 242.22892 |
Last modified: 11 September 2024