Fault Confusion
Fault Confusion
- Subject: Fault Confusion
- From: James Cicenia <email@hidden>
- Date: Wed, 28 Jul 2004 17:11:07 -0500
Hello -
I have a situation which I do not understand.
I have a portfolio that has projects... simple portfolio -->> projects
These projects have a many-to-many relationship with a metric.
When I use a fetch it works. However when I filter the array it doesn't.
Here is the fetch that works:
public NSArray q3BySelectedMetric(EOEditingContext ec, Portfolio
portfolio, PortfolioMetricList portfolioMetricList){
EOQualifier qualifier1;
NSMutableArray args = new NSMutableArray();
args.addObject("portfolioMetricLists");
args.addObject(portfolioMetricList);
qualifier1 = EOQualifier.qualifierWithQualifierFormat("%@ = %@",
args);
EOQualifier qualifier6;
NSMutableArray args2 = new NSMutableArray();
args2.addObject("portfolio");
args2.addObject(portfolio);
qualifier6 = EOQualifier.qualifierWithQualifierFormat("%@ = %@",
args2);
EOOrQualifier orQualifier1 =
new EOOrQualifier(
new NSArray(new Object[] { qualifierPipeline, qualifierProject,
qualifierMeasure }));
EOAndQualifier andQualifier1 =
new EOAndQualifier(
new NSArray(new Object[] { qualifier1, orQualifier1,
qualifier6}));
EOFetchSpecification fetchSpec = new
EOFetchSpecification("PortfolioProject",andQualifier1,null);
return (NSMutableArray) ec.objectsWithFetchSpecification(fetchSpec);
}
and here is the version against the relationship that doesn't:
public NSArray initiatedProjectsByMetricList(PortfolioMetricList
pPortfolioMetricList){
NSMutableArray results;
EOQualifier qualifier1;
NSMutableArray args = new NSMutableArray();
args.addObject("portfolioMetricLists");
args.addObject(pPortfolioMetricList);
qualifier1 = EOQualifier.qualifierWithQualifierFormat("%@ = %@",
args);
EOOrQualifier orQualifier1 =
new EOOrQualifier(
new NSArray(new Object[] { qualifierPipeline, qualifierProject,
qualifierMeasure }));
EOAndQualifier andQualifier1 =
new EOAndQualifier(
new NSArray(new Object[] { qualifier1, orQualifier1}));
results = (NSMutableArray)
EOQualifier.filteredArrayWithQualifier(this.projects(),andQualifier1);
return results;
}
Why doesn't the filteredArrayWithQualifier work??
-James
_______________________________________________
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.