JPQL and @Query

JPQL is JPA's query language: close to SQL, but expressed on entities and their attributes rather than on tables and columns. You write it with @Query in a repository and bind values through named parameters (:name) to avoid injection.

Example

@Query("select c from Client c where c.ville = :ville")
List<Client> parVille(@Param("ville") String ville);

Related concepts

The whole glossary