EOSortordering or ERXSortOrdering not ordering on NSArray

2009-05-19 Thread Gustavo Adolfo Pizano
Hello, I fetching some data as following. groups = XWSContactsGroup.fetchAllXWSContactsGroups(abEC, new NSArray(new Object[] {ERXSortOrdering.sortOrderingWithKey(XWSContactsGroup.CN, ERXSortOrdering.CompareDescending)})); for(XWSContactsGroup cg:groups){

Re: EOSortOrdering or ERXSortOrdering

2008-10-05 Thread getsharp
I guess I should have originally asked what error Eclipse gave you regarding your sortOrderings argument? The following is a legitimate value for sortOrderings in your example: new NSArray(new ERXSortOrdering("id",ERXSortOrdering.CompareDescending)) although it can be made cleaner using ERX

Re: EOSortOrdering or ERXSortOrdering

2008-10-05 Thread WebObjects
aha... ok but id is not a class property.. its the pk... :S ... why do I want them like that?...because the other class property its the name of the week, which its monday - sunday, but its repeated on the table, Im fetching all mondays... this was just to try out about the sort orderin

Re: EOSortOrdering or ERXSortOrdering

2008-10-05 Thread getsharp
Hi gus, I would recommend use ERXKey for sort ordering. EOSortOrdering order = WorkDay.ID.desc(); NSArray order = WorkDay.ID.descs(); assuming "id" is a class property. sharpy.. On 06/10/2008, at 12:22 PM, WebObjects wrote: Hello, well Im fetching some data, and I encounter here something,

EOSortOrdering or ERXSortOrdering

2008-10-05 Thread WebObjects
Hello, well Im fetching some data, and I encounter here something, when I created the EOModel and generate the javaclases, I got a method : public static NSArray fetchWorkDaies(EOEditingContext editingContext, EOQualifier qualifier, NSArray sortOrderings) { well, before I realize its third