Hi Luiz, If you’re sorting during a DB fetch, you should be able to set a collation on your table/column (although if you’re using Oracle, there’s some discussion on this issue here):
http://lists.apple.com/archives/webobjects-dev/2010/Jan/msg00458.html If you’re sorting in memory, you can use the workaround created here: http://lists.apple.com/archives/webobjects-dev/2012/Jul/msg00418.html If you’re using java 8, you can use Collections sorting rather than of EOSortOrdering. It’s a little more verbose but allows you to control whether nulls should appear first or last (and if you’re chaining comparators you can use the thenComparing method on comparator). NSArray<Pet> pets = fetchSomePets(); pets.sort( Comparator.comparing( Pet::name, Comparator.nullsLast( Comparator.naturalOrder() ) ); Hope this helps. Cheers, - hugi > On 16. jún. 2016, at 16:08, Luiz Alfredo Carrara Bertusso > <luizalfred...@gmail.com> wrote: > > Hello. > I've used the method sorted of ERXSortOrderings to sort a list according to > some rules. > The list I've sorted may have null values sometimes and I'd like these null > values coming at the end of the list. Is there an option to do that? > > Thanks. > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is > > This email sent to h...@karlmenn.is _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com