java - Query creation in Spring Data - dynamic where clause -


is there way in spring data dynamically form clause?

what want have method (which findby / method) runs , and using mentioned properties not null.

for example,

consider object person [firstname, lastname, age, gender] 

our method looks this

findby_ifnotnullfirstname_andifnotnulllastname_andifnotnullage_andifnotnullgender(string firstname, string lastname, integer age, string gender) 

thanks.

take @ jpa specification , predicate, , better querydsl, there both supported spring data repositories. article provide example: http://spring.io/blog/2011/04/26/advanced-spring-data-jpa-specifications-and-querydsl/


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -