• 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: Fetching from related object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fetching from related object


  • Subject: Re: Fetching from related object
  • From: Arturo PĂ©rez <email@hidden>
  • Date: Mon, 3 May 2004 20:23:55 -0400

On May 3, 2004, at 8:11 PM, Randall Perry wrote:

on 4/26/04 4:04 PM, Arturo Pirez at email@hidden wrote:


BTW, in a relatively unrelated aside, did you look at EOUtilities.objectMatchingValues. It's a bit easier then writing that fetchspec.
Am playing with this now. But given related EOModeler objects CustView and
Log joined on custNo, how do I do a join given an existing CustView object?


NSMutableDictionary dictionary = new NSMutableDictionary();
dictionary.takeValueForKey(custNo, ???);
dictionary.takeValueForKey(dateOneYearAgo, "dateTime");
logInfo = EOUtilities.objectsMatchingValues(ec, "Log", (NSDictionary)
dictionary);

Well, we never resolved why your faults from CustView to Log weren't firing correctly. Given that fundamental problem, there's no specific advice I can offer.


In general, though, an example of what you would need to do is: Assume we want all the CustView objects that have a Log object from April 1, 2002. You'd do something like:
dictionary.takeValueForKey(dateAprilFirst2002, "logs.dateTime");
NSArray customersWithLogEntryOnAprilFirst2002 =
EOUtilities.objectsMatchingValues(ec,
"CustView",
(NSDictionary)dictionary);


WO/EOF will take care of writing the proper join statements for that.
----
WO in philadelphia - wanna cheesesteak with that?
Please visit 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: 
 >Re: Fetching from related object (From: Randall Perry <email@hidden>)

  • Prev by Date: Re: Fetching from related object
  • Next by Date: Re: Problems trying to build an "Edit Relationship" page
  • Previous by thread: Re: Fetching from related object
  • Next by thread: Weird behavior - bug?
  • Index(es):
    • Date
    • Thread