I would like to make a list of all participants in my controller but using snake_case in JpaRepository is generating errors
Example:
in sql I would do:
select * from participants p where p.game_a = 1;
In repository I tried to do this:
@Repository
public interface ParticipantRepository extends JpaRepository<Participant, Long> {
List<Participant> findParticipantByGame_a(Game game_a);
}
Is there a way to do such thing using snake case or should I rename all properties in model to camel case to avoid this?
Error:
Failed to create query for method public abstract java.... No property game found for type Participant! Did you mean 'gameA'?
Using findParticipantByGameA or findParticipantBygameA does not work either