How to override table/grid sort method?

Hi,
Cuba component like table/grid can support “sort” method automaticlly, but the sort method for Chinese is not the general way accepted by Chinese reader.

For example, we use below query to set the order we need(by using postgres convert_to(name, ‘GB18030’) method).

select u from ubs$Company u order by function('convert_to', u.name,'GB18030')

or we can set the sort method in database level.

But neither above two methods can override the table/gird sort method.

How to override the sort method of table/gird? I may need all such component in my app support sort chinese in the way we want.

Thanks~

Hi,

Now it’s hard to override sort function for properties.
We have created issue: Add ability to override sort function for entity properties · Issue #1838 · cuba-platform/cuba · GitHub
Issue is scheduled on 7.1 release. We plan to extract sort statement generation into separate spring bean.
You can override this bean and apply function('convert_to', u.name,'GB18030') for each sort property.

Thanks

ok. Thanks.