Struggling with qualifiers involving sets
Struggling with qualifiers involving sets
- Subject: Struggling with qualifiers involving sets
- From: Denis Stanton <email@hidden>
- Date: Sun, 3 Aug 2003 20:24:56 +1200
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;
How can I use this set in my fetch spec? I have read the EOQualifier
specification, but I'm confused. The examples given don't seem to
cover my situation. Any suggestions?
Denis
_______________________________________________
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.