QuerySortOrder case insensitive

Hi Vaadin,

Is there any possibility to have QuerySortOrder to sort case insensitive ?

    protected List<QuerySortOrder> getDefaultSortOrders() {
        List<QuerySortOrder> sortOrders = new ArrayList<>();
        sortOrders.add( new QuerySortOrder( "lastName", SortDirection.ASCENDING));
        return sortOrders;

Currently a list is ordered like this :


and I prefer



Hi Jorn,

QuerySortOrder doesn’t have a field for defining if the query is to be case-sensitive or case-insensitive, but you can define that in your implementation of fetchFromBackEnd. If you are using spring-data you can check this answer https://stackoverflow.com/a/54647495 which shows how to fetch from the database using a case-insensive order by clause.