Re: Struggling with qualifiers involving sets
Re: Struggling with qualifiers involving sets
- Subject: Re: Struggling with qualifiers involving sets
- From: Kaj Hejer <email@hidden>
- Date: Sun, 3 Aug 2003 13:39:23 +0200
At 20:24 +1200 03-08-2003, Denis Stanton wrote:
I'm having trouble understanding how to construct a qualifier to use
in an EOFetchSpecification
I want to read a table of Vehicles and select all those that have
Types matching a list that the user has selected.
Each Vehicle has a one-to-one relationship to a Type, so if I was
looking for all vehicles of a single type instance named
requiredType I could write:
NSMutableArray args = new NSMutableArray();
args.addObject(requiredType);
qualifier = EOQualifier.qualifierWithQualifierFormat("type =
%@", args);
fetchSpec = new EOFetchSpecification("Vehicle", qualifier, null);
NSMutableArray vehicleArray = new
NSMutableArray(editingContext.objectsWithFetchSpecification(fetchSpec));
What I can't figure out is how to expand this to the case where
there are multiple types but the number selected may vary.
my selected Types are in a set
NSMutableSet typeSelectionSet;
Hi!
You might take a look at ERXInQualifier from ProjectWonder. See
http://wonder.sourceforge.net/javadoc/er/extensions/ERXInQualifier.html
and http://wonder.sourceforge.net/
-Kaj :)
_______________________________________________
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.