Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
- Subject: Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
- From: Kieran Kelleher <email@hidden>
- Date: Thu, 15 Mar 2012 17:36:39 -0400
On Mar 15, 2012, at 5:09 PM, Rich wrote:
>> OK, at the risk of chastisement, I disagree with David A and probably all of my other friends! :-)
>>
>> (1) Don't make 'id' a class property - IIRC, it may cause problems with PK generation.
>>
>> (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);
>>
>
> So are you saying I can create a EOSortOrdering based on my PK ('id') without exposing it as a class property by doing this - Is that right?
Yes you can. Try it. :-)
> If so, that's probably the answer I was after - Providing of corse I was to ignore the ethical debate on wether or not to use the PK at all in the first place
_______________________________________________
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