cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <>
Subject Re: Using Ordering to sort non-english strings in memory
Date Wed, 11 Jan 2017 22:42:59 GMT
I am +1 in principle. Just need to figure out a clean implementation that can distinguish between
String and other types of properties. Perhaps the initial solution may be a "StringOrdering
extends Ordering" that takes the collator and overrides comparison method? 


> On Jan 11, 2017, at 5:12 PM, Hugi Thordarson <> wrote:
> Hi all.
> It looks like Cayenne's Ordering uses String.compareTo() when sorting String values in
memory using orderList() and orderedList() — and there doesn’t seem to be any way to change
that behaviour. This means sorting of international strings in memory is somewhat broken.
> Do you think it would be a good idea to add support for:
> 1) Specifying a default java.text.Collator to use for new Ordering instances.
> 2) Specifying a java.text.Collator for an instance of Ordering.
> What do you think?
> Cheers,
> - hugi

View raw message