I need to perform a select using the @Query of spring data, however I need to pass the column name by parameter
Example:
@Query("SELECT g FROM Grupo g where g.? = ?")
Page<Grupo> findTeste(String campo, String valor);
To call method I wanted to pass the column name as follows:
//Pseudo code
page = grupoService.findTeste("id", "1");
page = grupoService.findTeste("nome", "asdf");
Is it possible to build some method like this in spring data?