Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
- Subject: Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
- From: Ramsey Gurley <email@hidden>
- Date: Thu, 15 Mar 2012 11:54:31 -0700
On Mar 15, 2012, at 11:46 AM, Chuck Hill wrote:
>
> On 2012-03-15, at 11:41 AM, Ramsey Gurley wrote:
>>
>> Dave A's point still stands though. The ID is unique, but not necessarily in any particular order. I'd go with a dateCreated column populated in willInsert() or init(). Using the pk to determine the date created is just sloppy and will come back to haunt Rich one day. If Rich wants something that's easy to sort with JSON, then I would suggest formatting the date as a value that sorts easily and send that down to the client. YYYY-MM-DD, date.getTime() or something.
>
>
> I agree. Using the PK as anything other than a fully meaningless "that one" indicator is doing to bite you. Hard. I just don't see the point of creating a second meaningless key to hide the first meaningless key (PK).
>
>
> Chuck
Uh oh... I think we both just agreed with Dave A!
(^_^)
Ramsey
_______________________________________________
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