@Query("SELECT DISTINCT mag FROM Magazine mag, IN(mag.articles) art WHERE art.name= 'Grisham'")
這種方式能夠正常使用Page的分頁功能html
public Page<Magazine> findDistinctByArticles_Name(Pageable page,String name);
這種方式的話,distinct是內存過濾的,另外page的count也不許確oracle
JPQL Collection Member Declarationscode