Hi !
Unfortunately I tested this and this results in the same issue I
pointed earlier.
I did not check the SQL generated in that case but I guess its the
same since it does not work either :-(
The only solution I found was to do two separate
ec.objectsWithFetchSpecification(fs); with each qualifier and then
sorting and removing duplicates by hand in Java.
Fabrice
On Nov 23, 2006, at 10:22 AM, Daniele Corti wrote:
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 PROTECTED]
www.easyshadow.com
International Corporate Consulting
Palais de la Scala
1 avenue Henri Dunant
Suite 1155
MC - 98000 Monaco
Skype: fabrice.pipart
Tel. +377 97 98 21 04 (direct)
Fax. +377 97 70 88 07
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]