'how to make null values last while sorting in JPA

criteria.addOrder(Order.desc(customer.customerName));

By using above one i'm getting only customerNames but i want also get who don't have the customerName(null).



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source