Closed
Description
Hi all,
I have create a specification for querying my database, I would like to set the precedence of null ordering, I create a pageable with custom sort :
Pageable customPageable = pageable;
for (Order sort : pageable.getSort()) {
if (sort.getProperty().equals("column")) {
List<Sort.Order> orderList = new ArrayList<>();
if (sort.isAscending()) {
orderList.add(new Sort.Order(Sort.Direction.ASC,
"column", NullHandling.NULLS_FIRST));
} else {
orderList.add(new Sort.Order(Sort.Direction.DESC,
"column", NullHandling.NULLS_LAST));
}
customPageable = PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), Sort.by(orderList));
}
}
repository.findAll(new Specification(), customPageable);
And when the request is execute on postgres database, only ASC or DESC is readable inside the log file.
i do it wrong, this is a missing functionnality or a bug ?