博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
spring data jpa根据方法名查询
阅读量:6354 次
发布时间:2019-06-22

本文共 1634 字,大约阅读时间需要 5 分钟。

表达式 例子 hql查询语句
And findByLastnameAndFirstname … where x.lastname = ?1 and x.firstname = ?2
Or findByLastnameOrFirstname … where x.lastname = ?1 or x.firstname = ?2
Is,Equals findByFirstname,findByFirstnameIs,findByFirstnameEqual … where x.firstname = 1?
Between findByStartDateBetween … where x.startDate between 1? and ?2
LessThan findByAgeLessThan … where x.age < ?1
LessThanEqual findByAgeLessThanEqual … where x.age ⇐ ?1
GreaterThan findByAgeGreaterThan … where x.age > ?1
GreaterThanEqual findByAgeGreaterThanEqual … where x.age >= ?1
After findByStartDateAfter … where x.startDate > ?1
Before findByStartDateBefore … where x.startDate < ?1
IsNull findByAgeIsNull … where x.age is null
IsNotNull,NotNull findByAge(Is)NotNull … where x.age not null
Like findByFirstnameLike … where x.firstname like ?1
NotLike findByFirstnameNotLike … where x.firstname not like ?1
StartingWith findByFirstnameStartingWith … where x.firstname like ?1 (parameter bound with appended %)
EndingWith findByFirstnameEndingWith … where x.firstname like ?1 (parameter bound with prepended %)
Containing findByFirstnameContaining … where x.firstname like ?1 (parameter bound wrapped in %)
OrderBy findByAgeOrderByLastnameDesc … where x.age = ?1 order by x.lastname desc
Not findByLastnameNot … where x.lastname <> ?1
In findByAgeIn(Collection ages) … where x.age in ?1
NotIn findByAgeNotIn(Collection age) … where x.age not in ?1
True findByActiveTrue() … where x.active = true
False findByActiveFalse() … where x.active = false
IgnoreCase findByFirstnameIgnoreCase … where UPPER(x.firstame) = UPPER(?1)

转载于:https://www.cnblogs.com/songrang/p/9675635.html

你可能感兴趣的文章
用Python做大批量请求发送
查看>>
HDU-1231,最大区间连续和总结-分治法-dp
查看>>
How to remove popup on boot on Windows 2003
查看>>
css之position相对定位和绝对定位
查看>>
「译」Java集合框架系列教程四:Set接口
查看>>
max number of clients reached Redis测试环境报错
查看>>
【Andorid开发框架学习】之Mina开发之服务器开发
查看>>
2.3.9 python 内置函数
查看>>
C#学习(八)之Stream
查看>>
POJ 1182
查看>>
格式化数字字符串 与C#变量
查看>>
二、Java面向对象(7)_封装思想——理解封装思想
查看>>
Android课程---Android ImageView的scaleType属性与adjustViewBounds属性(转)
查看>>
2018-2019-1 20165212 20165313 20165222 实验四 外设驱动程序设计
查看>>
重定向redirect与跳转forward区别
查看>>
[原]Unity3D深入浅出 - GUI控件
查看>>
安装jdk出现的问题
查看>>
【leetcode】813. Largest Sum of Averages
查看>>
gdb常用命令,实用手册(转载)
查看>>
027、限制容器对内存的使用(2019-01-22 周二)
查看>>