• 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: Randall Perry <email@hidden>
  • Date: Sun, 25 Apr 2004 14:59:34 -0400

Found the example for using an NSDictionary with a EO fetch spec on page 124
of the EO manual.

Fetch spec definition of 'DateOneYearAgo':

    ((CustView = $cust) and (dateTime > $dateOneYearAgo))

Code to do the fetch:
        NSMutableDictionary dictionary = new NSMutableDictionary();
        dictionary.takeValueForKey(custInfo, "cust");
        dictionary.takeValueForKey(dateOneYearAgo, "dateOneYearAgo");
        EOModelGroup modelGroup = EOModelGroup.defaultGroup();
        EOFetchSpecification logFetchSpec =
modelGroup.fetchSpecificationNamed("dateOneYearAgo", "Log");
        logFetchSpec =
logFetchSpec.fetchSpecificationWithQualifierBindings(dictionary);
        logInfo = ec.objectsWithFetchSpecification(logFetchSpec);


The custInfo and dateOneYearAgo vars have non-null values. But when the
fetch runs I get a null pointer exception.

Anything wrong with my code above?


--
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.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: Arturo PĂ©rez <email@hidden>)

  • Prev by Date: Re: Fetching from related object
  • Next by Date: Re: Fetching from related object
  • Previous by thread: Re: Fetching from related object
  • Next by thread: Re: Fetching from related object
  • Index(es):
    • Date
    • Thread