Filtering array returned by an EO's relationship (D2J)
Filtering array returned by an EO's relationship (D2J)
- Subject: Filtering array returned by an EO's relationship (D2J)
- From: Ray Ackland <email@hidden>
- Date: Mon, 27 Oct 2003 19:25:39 +1300
My database holds some main, stable entities, which are related to some
continually updated trivial entities. Specifically staff members and
time sheet records.
Currently the staff member can view their existing time records, but
this returns '000s of them so is slow to process as well as providing
too much information. I am trying to find a way that I can filter these
to just the last n records (the last week say, or the last 20 entries).
I can do this by getting the array returned by the storedValueForKey()
method, and doing an in-memory filteredArrayWithQualifier() to limit
the results. But this would require the complete array to be sent to
the client first.
I also imagine I can invoke a server side method to return the filtered
array. But is there a "simple" way to return just the selection I want?
I know I could use a fetch specification using the desired qualifier,
but will that relate the returned objects to the entity I am calling it
from, hence avoiding death and destruction for the rest of my programme?
Ray.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.