Daniel,

I should have asked, but you’re using WOnder, right?  I use WOnder and 
templates that generate a lot of good stuff.  Are you generating _<Entity> and 
<Entity> files?

Assuming you are, you can use some of the convenience methods, like:

NSArray<Car> = Car.fetchCars(editingContext, Car.BRAND.in(brands), null);

You can do all of this without the templates, but you really need ERXKEY to 
generate the qualifier for you.

Ken


> On Feb 12, 2015, at 11:15 AM, Daniel Hausberger <[email protected]> 
> wrote:
> 
> Hi Ken,
> thank you for your reply. This looks exactly like the thing i have looked 
> for, but i have no idea how to use this?
>  
> How do i get a list of Cars with the ERXOrQualifier? Sorry for this question, 
> but i have never done it like this before.
>  
> Can you help me?
> Thanks,
> Daniel
>  
> Gesendet: Donnerstag, 12. Februar 2015 um 17:06 Uhr
> Von: "Ken Anderson" <[email protected]>
> An: "Daniel Hausberger" <[email protected]>
> Cc: [email protected]
> Betreff: Re: EOModeler, search with Array
> Daniel,
>  
> You can use the in method of the ERXKEY like this:
>  
> NSArray<Brand> brands = new NSArray<Brand>(new Brand[] {vw, audi, bmw});
> Car.BRAND.in(brands);
>  
> This still generates an OR qualifier, but it’s prettier.
>  
> Ken
>  
>  
> On Feb 12, 2015, at 8:25 AM, Daniel Hausberger <[email protected] 
> <x-msg://62/[email protected]>> wrote:
>  
> Hi Experts,
> i'm strugeling around with an (i think so) easy problem: What is the right 
> way to make an Qualifier (for a Fetch-Specification in EOModeler) to not 
> search with just one single Object, but with a list of objects:
>  
> For example this model:
>  
>         1 Car-Brand produces many Cars (e.g. VW procudes Jetta, Golf, Passat, 
> etc.)
>  
> If i want to search all Cars for "VW" my qualifier looks something like: 
>  
>         brand = $carBrand   ... (eg. Car.fetchForList(ec, brandVW);)
>  
> But was is the correct way to search for a list of brands? e.g: What is the 
> correct way to search for all Cars of "VW", "Audi", etc.?
>  
> I know that it is possible to search something like this:
>  
>         brand = $carBrand1 or brand = $carBrand2, etc.             (e.g. 
> Car.fetchForList(ec, brandVW, brandAudi, etc.);).
>  
> But this is not the best way?
>  
> Thank you,
>  
> Daniel
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected] 
> <x-msg://62/[email protected]>)
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/kenlists%40anderhome.com
>  
> <https://lists.apple.com/mailman/options/webobjects-dev/kenlists%40anderhome.com>
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to