Re: Fetching from related object
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.