Re: Two tables walk into an EO model...
Re: Two tables walk into an EO model...
- Subject: Re: Two tables walk into an EO model...
- From: email@hidden (Anjo Krank)
- Date: Sun, 3 Aug 2003 12:13:33 +0200
- Xx-reply-to: email@hidden
Am Sonntag, 03.08.03, um 11:31 Uhr (Europe/Berlin) schrieb Goodbye Bill:
Using this example above, I need to find all Employees based on the
following criteria:
1. Employee must be female; and
2. Office must be located in the 06492 postal code
How in the world does one do this?
Assuming that you have a flattened EmployeeOffice join entity (created
with the EOModeler > Property >"Join in Many To Many" command), which
should be named "offices" in the employee you construct the qualifier
with:
EOQualifier q = EOQualifier.qualifierWithQualiferFormat("gender = 'f'
and offices.postalCode = '06492'");
Further assuming that you already have an array "allEmployees" you can
also say:
NSArray mathes = EOQualifier. filteredArrayWithQualifier(allEmployees,
q);
which should answer your other question...
Cheers, Anjo
_______________________________________________
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.