I am using Spring Data for adding into my grid a list of Customer.
In my repository, I have the following method :
public List<CustomerDto> findAllByFirstNameContainingOrLastNameContainingAllIgnoreCase(String firstName, String lastName);
It works, but in reality, firstName and lastName parameters are the same value.
Is there by any chance the possibility to achieve, by only using the method's keyword functionnality (I don't wanna add complexity by using the @Query annotation and writing my own query), to have only one parameter for filtering my two columns and avoiding me to provide the same parameter twice in the method like :
repository.myNewAwesomeMethodForFilteringTwoColumnsWithOneValue(filterValue);
Instead of :
repository.findAllByFirstNameContainingOrLastNameContainingAllIgnoreCase(filterValue, filterValue);
Thanks for your help, if you have any ideas or suggestions !