Spring与Jpa整合(11)
发布时间:2021-06-11
发布时间:2021-06-11
Spring与Jpa整合
Keyword Sample
JPQL
snippet bound
wrapped in %
) where x.age = ?1 order by stname desc where stname <> ?1
where x.age in ?1
where x.age not in ?1 where x.active = true where x.active = false where UPPER(x.firstame) = UPPER(?1)
OrderBy findByAgeOrderByLastnameDesc
Not findByLastnameNot
In NotIn
findByAgeIn(Collection<Age> ages) findByAgeNotIn(Collection<Age> age)
True findByActiveTrue()
False findByActiveFalse()
IgnoreCase findByFirstnameIgnoreCase
当然,我们也可以使用@Query注解。使用方法如下:
或
上一篇:五子棋游戏源代码