• 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: EOQualifier on a toMany attribute
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EOQualifier on a toMany attribute


  • Subject: Re: EOQualifier on a toMany attribute
  • From: Lachlan Deck <email@hidden>
  • Date: Tue, 14 Feb 2006 16:29:56 +1100

Hi there,

On 14/02/2006, at 10:15 AM, Dev WO wrote:

Hi,
I don't know if I'm doing it wrong or if I'm just misuse EOQualifier but:
I have an entity a with a flattened manyToMany relationship named connectors on a connector entity.


I need to qualify a fetch on entity a based on having connector %@
so basically I was doing
EOQualifer.qualifierWithQualifierFormat("connectors = %@", arg);
arg having a connector entity.

If I understand properly, you have entity A << -- >> B

You want to fetch objects of entity 'A' filtering the fetch based on the objects related to A in B. Correct?

So you need something like:
---------------------------------------------
NSArray args;
EOQualifier qualifier;
EOFetchSpecification fetchSpec;
NSMutableArray results;

args = new NSArray( new Object[] { "connectors.someKey", someValue } );
qualifier = EOQualifier.qualifierWithQualifierFormat( "%@ = %@", args );
fetchSpec = new EOFetchSpecification( "A", qualifier, null );
results = ec.objectsWithFetchSpecification( fetchSpec ).mutableClone();

with regards,
--

Lachlan Deck


_______________________________________________ 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
References: 
 >EOQualifier on a toMany attribute (From: Dev WO <email@hidden>)

  • Prev by Date: Re: EOQualifier on a toMany attribute
  • Next by Date: Unique attributes
  • Previous by thread: Re: EOQualifier on a toMany attribute
  • Next by thread: Re: EOQualifier on a toMany attribute
  • Index(es):
    • Date
    • Thread