Re: FetchSpec seems to ignore qualifier
Re: FetchSpec seems to ignore qualifier
- Subject: Re: FetchSpec seems to ignore qualifier
- From: Art Isbell <email@hidden>
- Date: Wed, 3 Mar 2004 14:49:44 -1000
On Mar 3, 2004, at 1:23 PM, David Griffith wrote:
EOFetchSpecification fs = new EOFetchSpecification();
fs = fs.fetchSpecificationNamed("getLanguageFromString",
"Language");
Does the compiler not complain about the above statement? The WO
5.2.2 docs state that EOFetchSpecification's fetchSpecificationNamed()
method is a static, not an instance method. So the above two
statements should be:
EOFetchSpecification fs =
EOFetchSpecification.fetchSpecificationNamed("getLanguageFromString",
"Language");
NSMutableDictionary dictionary = new NSMutableDictionary();
dictionary.takeValueForKey(languageName, "langName");
fs = fs.fetchSpecificationWithQualifierBindings(dictionary);
NSMutableArray languages= new
NSMutableArray(ec.objectsWithFetchSpecification(fs));
I don't see anything obviously wrong with the above statements, but
they can be condensed to the following:
NSDictionary dictionary = new NSDictionary(languageName, "langName");
NSMutableArray languages = new
NSMutableArray(EOUtilities.objectsWithFetchSpecificationAndBindings(ec,
"Language", "getLanguageFromString", dictionary));
Aloha,
Art
_______________________________________________
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.