Q:

CrudRepository Spring Data @Query syntax

The @Query annotation supports only JPA query syntax or Hibernate (HQL)? or both of them i am kinda confused
interface TodoRepository extends CrudRepository<Todo, Long> { 

@Async
@Query("SELECT t.title FROM Todo t where t.id = :id") 
Book<String> findTitleById(@Param("id") Long id);

A:

SpringData repositories support JPQL (Java Persistence Query Language).
Though JPQL is a subset of HQL so any JPQL query is a valid HQL query.
The inverse is obviously not true.

