SpringDataJpa方法名支持的關(guān)鍵字

keywords sample JPQL snippet
And findByLastnameAndFirstname … where x.lastname = ?1 and x.firstname = ?2
Or findByLastnameOrFirstname … where x.lastname = ?1 or x.firstname = ?2
Is,Equals findByFirstname , findByFirstnameIs , findByFirstnameEquals … 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<Age> ages) … where x.age in ?1
NotIn findByAgeNotIn(Collection<Age> ages) … 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)
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

  • 今天,2018年6月9日,齊悅夢想大型社群開營啦,而我有幸成為了夢想社群中一營三班的一名學(xué)生。 ...
    姊游閱讀 444評論 6 6
  • 我的教官先生 須盡歡 第一章阿北哥哥 我出生在華國的一個南方城市,父母只有我一個女兒,在我18年的生命中,我一向只...
    須盡歡_3791閱讀 665評論 0 0
  • 每一夜都能干干凈凈 心安理得 精疲力盡地入睡 每一天也能清清爽爽 心平氣和 精神充沛的醒來 這就是最好的生活
    嗯嗯_c7a1閱讀 107評論 0 1
  • 今早才發(fā)現(xiàn),晨光熹微里的榆樹冠部,圍繞著一團(tuán)郁郁濃濃的綠色,這些綠來自枝椏上簇?fù)淼挠苠X,它們在瞬間帶給我的不僅僅是...
    牧塵Muchen閱讀 1,721評論 40 28

友情鏈接更多精彩內(nèi)容