I'm trying to add to a list management with null values Results with null values must leave at the end. Add the option to the Order class in two different ways in the SQL query but nothing appears. I am using Oracle and if the consultation launched from a management database with null values results are listed at the end by default.
This is my code:
List<Order> orders = new ArrayList<Order>();
orders.add(new Order(Direction.DESC, "points"));
//THIS
orders.add(new Order(Direction.DESC, "person.date", NullHandling.NULLS_LAST));
//OR THIS
orders.add(new Order(Direction.DESC, "person.date").nullsLast());
//NOT WORKING
orders.add(new Order(Direction.DESC, "id"));
List<Foo> foos = fooRepository.findAll(new Sort(orders));
How I can specify that null results should go to the end?