• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Filtering array returned by an EO's relationship (D2J)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Filtering array returned by an EO's relationship (D2J)


  • Subject: Re: Filtering array returned by an EO's relationship (D2J)
  • From: Arturo PĂ©rez <email@hidden>
  • Date: Mon, 27 Oct 2003 07:35:10 -0500

On Monday, October 27, 2003, at 01:25  AM, Ray Ackland wrote:

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?

Fetch specifications are tied to an Entity. So, for example, a fetch on Timesheet entities only returns
that kind of thing. This is as opposed to raw sql statements which just return NSDictionaries. In fact,
once you see what's going on, you can even do a fetch for Timesheet entities
by traversing its relationships to other Entities. So, eg, Timesheet is related to Department and Department
is related to Employee. You can define a fetch on Timesheet that looks like this


		Timesheet->Department->Employee == $thisEmployee

and you'll get Timesheet entries related to only that Employee working for that Department. Very nice.

So, if you're concerned about sending lots of data to the client I would use a server-side method to
invoke a fetch spec to limit the data.


-------
WebObjects in Philadelphia.  You want a cheesesteak with that?
Visit http://webobjects.meetup.com
_______________________________________________
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.

References: 
 >Filtering array returned by an EO's relationship (D2J) (From: Ray Ackland <email@hidden>)

  • Prev by Date: Re: KVC and static methods (was Hairy Java related question)
  • Next by Date: Re: KVC and static methods
  • Previous by thread: Filtering array returned by an EO's relationship (D2J)
  • Next by thread: Re: Filtering array returned by an EO's relationship (D2J)
  • Index(es):
    • Date
    • Thread