Re: EOQualifier issue
Re: EOQualifier issue
- Subject: Re: EOQualifier issue
- From: "Daniele Corti" <email@hidden>
- Date: Thu, 23 Nov 2006 10:22:06 +0100
Hi, I think Alexander means:
EOQualifier qual = new EOKeyValueQualifier("employer.company", EOQualifier.QualifierOperatorEqual, playlist);
EOQualifier qual2 = new EOKeyValueQualifier("employee.company", EOQualifier.QualifierOperatorEqual, playlist);
EOOrQualifier filter = new EOOrQualifier(new NSArray(new Object[] { qual, qual2 }));
EOSortOrdering nameOrdering = EOSortOrdering.sortOrderingWithKey("name", EOSortOrdering.CompareAscending);
NSMutableArray ordering = new NSMutableArray();
ordering.addObject(nameOrdering);
EOFetchSpecification fs = new EOFetchSpecification("Person", filter, ordering, true, false, null);
NSArray mediaList = ec.objectsWithFetchSpecification(fs);
this is the same to do in SQL: "SELECT * in Person WHERE (
employer.company = '$playlist' OR employee.company = '$playlist') ORDER BY name"
where $playlist is the value of your object playlist
I hope this could help,
Bye
--
Daniele Corti
AIM: S0CR4TE5
Messenger:
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden