What is the best way to order Entities by some String field that contains polish letters? Is there a way to do that with Spring Data? Can I include Locale into Pageabe for this?:
Page<Collection> findByInstitutionIdAndIsDeletedFalse(Long institutionId, Pageable pageable);
and
Sort.Order entityOrder = Sort.Order.by("title").ignoreCase();
PageRequest pageable = PageRequest.of(page, perPage, Sort.by(entityOrder));
When I do like that, I have:
- alaska
- lalka
- termos
- łóżko
But "łóżko" should be after "lalka".
I tried to change Locale in Postgres database, but it didn't work for db1 nor db2.
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+------------+------------+-----------------------
db1 | user | UTF8 | pl_PL | pl_PL |
db2 | user | UTF8 | pl_PL.utf8 | pl_PL.utf8 |
db3 | user | UTF8 | en_US.utf8 | en_US.utf8 |
Thanks for any suggestions!