sorting - Sort By Boolean value in Spring Data -


i'm using spring data , have repo method returning products. need sort result list availability, available products should displayed first.

product has boolean field 'available'. in order achieve sorting availability i'm trying define repository method like

list<product> findallorderbyavailable(); 

but doesn't work. idea if achievable spring data?

following spring data documentation , have insert by after findall indicate thats criteria starts, , you're missing order asc or desc, should this:

list<product> findallbyorderbyavailableasc(); //or desc


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -