• 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
Fetch vs Qualifier on a Relationship Array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fetch vs Qualifier on a Relationship Array


  • Subject: Fetch vs Qualifier on a Relationship Array
  • From: James Cicenia <email@hidden>
  • Date: Thu, 4 Nov 2004 16:41:14 -0600

Hello -

Why is it when I do a qualifier on a related array I get nothing back but when I do a fetch I get the correct
result?


This works:

EOQualifier myQualifier1;
NSMutableArray args1 = new NSMutableArray();
args1.addObject("user");
args1.addObject(this);
myQualifier1 = EOQualifier.qualifierWithQualifierFormat("%@ = %@", args1);

EOQualifier myQualifier2;
NSMutableArray args2 = new NSMutableArray();
args2.addObject("portfolio");
args2.addObject(portfolio);
myQualifier2 = EOQualifier.qualifierWithQualifierFormat("%@ = %@", args2);

EOAndQualifier andQualifier1 = new EOAndQualifier(new NSArray(new Object[]{myQualifier1,myQualifier2}));

EOFetchSpecification fs = new EOFetchSpecification("PortfolioUserGroup",andQualifier1,null);
NSMutableArray results = (NSMutableArray) this.editingContext().objectsWithFetchSpecification(fs);


While this won't. Why?

Object nameOrdering = null;
EOQualifier myQualifier;
NSMutableArray args = new NSMutableArray();
args.addObject("portfolio");
args.addObject(portfolio);
myQualifier = EOQualifier.qualifierWithQualifierFormat("%@ = %@", args);


NSMutableArray results = (NSMutableArray)EOQualifier.filteredArrayWithQualifier(portfolioUserGrou ps(), myQualifier);

the porftfolioUserGroups() is a relation that points portfolios to users to groups. The original array it returns is correct but when
I qualify it with the portfolio it returns nothing. I have checked that the portfolio is correct and the array is correct. I am guessing
it has to do with faulting. Is there some deep fault switch I am missing?


_______________________________________________
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:
    • Re: Fetch vs Qualifier on a Relationship Array
      • From: Chuck Hill <email@hidden>
    • Re: Fetch vs Qualifier on a Relationship Array
      • From: Jean-François Veillette <email@hidden>
  • Prev by Date: Re: EOReporter Question
  • Next by Date: Re: WO & Lucene
  • Previous by thread: Changing the order of stringQualifierOperators array
  • Next by thread: Re: Fetch vs Qualifier on a Relationship Array
  • Index(es):
    • Date
    • Thread