Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
- Subject: Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
- From: Paul Hoadley <email@hidden>
- Date: Fri, 16 Mar 2012 09:13:18 +1030
On 16/03/2012, at 4:24 AM, Kieran Kelleher wrote: (2) You *can* use a non-attribute PK named "id" (or whatever) as a sort *key* in a EOFetchSpecification .... you just can't use it for "in-memory" sort.
EOSortOrdering s = new EOSortOrdering("id", EOSortOrdering.CompareAscending);
BTW, you can even use "id" for EOQualifiers, again only in a EOFetchSpecification that will generate SQL and fetch, but not in an EOQualifier that will be used for in-memory qualification.
Oh good point. If you use "primaryKey" as I suggested yesterday, you'll have the opposite problem. You won't be able to use it to sort directly on fetch, but you would be able to sort in-memory afterwards.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden