I am showing a (language specific) label for values in a column. The column is sortable and the JSF label is different from the database value. I am using a primefaces datatable with pagination.
How can I sort by label and not by the database value? Is there any kind of translation possible so my JPA criteria knows about the different value?
Sorting it in-memory is not an option since the dataset might be huge and I only want to display a subset (pagination size is e.g. 10 items per page)