Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
- Subject: Re: ERXRestFetchSpecification defaultSortOrderings ordered by id (PK)
- From: Ray Kiddy <email@hidden>
- Date: Wed, 14 Mar 2012 20:06:45 -0700
On Mar 14, 2012, at 7:33 PM, Rich wrote:
> Hi guys,
>
> I can't seem to find a way to do a sort order based on the Entity objects Primary Key in an ERXRestFetchSpecification (the defaultSortOrdering specifier)
>
> I seem to be able to sort by any of the Attributes/Properties but not the PK (which I've called 'id') - Am I missing something glaringly obvious (probably)
>
> Cheers,
> Rich
Is the "id" attribute a class property? It is usual that it is not. If it is not, then it will not be usable in this manner.
Keeping in mind the fact that the pk of the table should be something invisible outside the table, so that nothing outside the table can impose a meaning on it and thereby want to change it, why would you want to sort by the pk?
You should probably sort by something that means something. The pk should not mean anything. On the other hand, if you make the "id" attribute into a class property, the EOF gods will probably not smite you with righteous lightning and thunder. It just makes for a less clean schema design.
- ray
_______________________________________________
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