• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EOModeler, search with Array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOModeler, search with Array


  • Subject: Re: EOModeler, search with Array
  • From: Ken Anderson <email@hidden>
  • Date: Thu, 12 Feb 2015 11:06:52 -0500

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@hidden> 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@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Aw: Re: EOModeler, search with Array
      • From: Daniel Hausberger <email@hidden>
References: 
 >EOModeler, search with Array (From: Daniel Hausberger <email@hidden>)

  • Prev by Date: Re: assigning relationship in willInsert()
  • Next by Date: Aw: Re: EOModeler, search with Array
  • Previous by thread: EOModeler, search with Array
  • Next by thread: Aw: Re: EOModeler, search with Array
  • Index(es):
    • Date
    • Thread