Re: setting default order of entity fetches
Re: setting default order of entity fetches
- Subject: Re: setting default order of entity fetches
- From: Louis Demers <email@hidden>
- Date: Wed, 22 Aug 2007 23:39:24 -0400
Hi,
this is the first time I saw the page you referenced. Is there some
error on the page
http://wiki.objectstyle.org/confluence/display/WO/
Programming__WebObjects-Project+WONDER-Frameworks-ERExtensions
which cases none of the links to work ?
On 22-Aug-07, at 22:52 , Steven Mark McCraw wrote:
For Wonder users, you can do all kinds of neat things with
ERXArrayUtilities and key-value coding:
http://wiki.objectstyle.org/confluence/display/WO/
Programming__WebObjects-WOnder-ERXArrayUtilities
This allows you to do things like quickly and easily sort in your
bindings:
list = email@hiddename,firstName
There are tons of neat things you can do besides sorting (and you
can extend it to do still other things), but this thread made me
think of the sorting functionality (although I'm not clear if it
useful for solving the problem that started the thread).
Mark
On Aug 22, 2007, at 10:40 PM, Ken Anderson wrote:
To me, sorting is something that should really occur at the UI or
'use' level. Also, if you consider the amount of CPU needed to
sort the EOs returned to you, it's probably comparable to what the
DB has to do anyway, so why not distribute it?
On Aug 22, 2007, at 9:22 PM, Lachlan Deck wrote:
On 23/08/2007, at 10:46 AM, Chuck Hill wrote:
On Aug 22, 2007, at 5:09 PM, Lachlan Deck wrote:
Hi there,
EOEntity has a restrictingQualifier that's applied to every
fetch for the relevant entity.
Is there any similar mechanism for installing a default
ordering for fetched objects of each entity (e.g., when
following a toMany relationship)? Or any delegate methods
somewhere?
No. And don't override the EOF methods to do this or you risk
messing with EOF. And we all know how that ends up. :-) The
reason for the lack of sorting, as I understand it, is that EOF
would then need to keep the list sorted each time something was
added to it.
It's already keeping them sorted (think about it...). Just not
how I'd like.
Furthermore, it's impossible to fetch records from a database
without them sorted in some kind of order. I'm simply wanting to
override the arbitrary sort order that the database wants to
return to suit this particular application.
And what if you wanted alternate sorts?
Simply apply the default sorting in the absence of a specific
sort orderings array. Not hard conceptually.
The standard approach is to have a cover method that sorts the
contents of the relationship and returns it.
Which kinda makes *every* toMany relationship generated from each
EOEntity useless don't you think?
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40bluecollarsoftware.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
Louis Demers eng.
www.obzerv.com
_______________________________________________
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