Re: EOQualifier and Fetch Bug?
Re: EOQualifier and Fetch Bug?
- Subject: Re: EOQualifier and Fetch Bug?
- From: Chuck Hill <email@hidden>
- Date: Tue, 9 Nov 2004 07:31:00 -0800
Why the AND qualifiers? I have no idea what is supposed to happen.
Try printing out the final qualifier. Also just AND 1 and 2 and OR
this with 3,4,5,6 to get the same result.
Chuck
On Nov 9, 2004, at 6:28 AM, James Cicenia wrote:
Hello -
I have been trying to get my fetch to work. When I perform the fetches
one at a time
I can get records. However, when I put them into an OR I don't get
what the individual
fetches get. Anyone else see a problem like this?
-James
EOQualifier myQualifier1;
NSMutableArray args1 = new NSMutableArray();
args1.addObject("projectState.lifeCycleState");
args1.addObject(pLifeCycle);
myQualifier1 = EOQualifier.qualifierWithQualifierFormat("%@ = %@",
args1);
EOQualifier myQualifier2;
NSMutableArray args2 = new NSMutableArray();
args2.addObject("portfolio");
args2.addObject(portfolio);
myQualifier2 = EOQualifier.qualifierWithQualifierFormat("%@ = %@",
args2);
EOQualifier myQualifier3;
NSMutableArray args3 = new NSMutableArray();
args3.addObject("rosterMembers.resource.tosuser");
args3.addObject( this);
myQualifier3 = EOQualifier.qualifierWithQualifierFormat("%@ = %@",
args3);
EOQualifier myQualifier4;
NSMutableArray args4 = new NSMutableArray();
args4.addObject("assignedProjectManager.tosuser");
args4.addObject( this);
myQualifier4 = EOQualifier.qualifierWithQualifierFormat("%@ = %@",
args4);
EOQualifier myQualifier5;
NSMutableArray args5 = new NSMutableArray();
args5.addObject("sponsor.tosuser");
args5.addObject( this);
myQualifier5 = EOQualifier.qualifierWithQualifierFormat("%@ = %@",
args5);
EOQualifier myQualifier6;
NSMutableArray args6 = new NSMutableArray();
args6.addObject("submitter.tosuser");
args6.addObject( this);
myQualifier6 = EOQualifier.qualifierWithQualifierFormat("%@ = %@",
args6);
EOAndQualifier andQualifier1 =
new EOAndQualifier(
new NSArray(
new Object[] {
myQualifier1,
myQualifier2,
myQualifier3}));
EOAndQualifier andQualifier2 =
new EOAndQualifier(
new NSArray(
new Object[] {
myQualifier1,
myQualifier2,
myQualifier4}));
EOAndQualifier andQualifier3 =
new EOAndQualifier(
new NSArray(
new Object[] {
myQualifier1,
myQualifier2,
myQualifier5}));
EOAndQualifier andQualifier4 =
new EOAndQualifier(
new NSArray(
new Object[] {
myQualifier1,
myQualifier2,
myQualifier6}));
EOOrQualifier orQualifier1 =
new EOOrQualifier(
new NSArray(
new Object[] {
andQualifier1,
andQualifier2,
andQualifier3,
andQualifier4}));
EOFetchSpecification fs1= new
EOFetchSpecification("PortfolioProject",andQualifier1,null);
NSMutableArray results1 = (NSMutableArray)
this.editingContext().objectsWithFetchSpecification(fs1);
System.out.println("1 Result count is "+results1.count());
EOFetchSpecification fs2= new
EOFetchSpecification("PortfolioProject",andQualifier2,null);
NSMutableArray results2 = (NSMutableArray)
this.editingContext().objectsWithFetchSpecification(fs2);
System.out.println("2 Result count is "+results2.count());
EOFetchSpecification fs3= new
EOFetchSpecification("PortfolioProject",andQualifier3,null);
NSMutableArray results3 = (NSMutableArray)
this.editingContext().objectsWithFetchSpecification(fs3);
System.out.println("3 Result count is "+results3.count());
EOFetchSpecification fs4= new
EOFetchSpecification("PortfolioProject",andQualifier4,null);
NSMutableArray results4 = (NSMutableArray)
this.editingContext().objectsWithFetchSpecification(fs4);
System.out.println("4 Result count is "+results4.count());
EOFetchSpecification fs= new
EOFetchSpecification("PortfolioProject",andQualifier1,null);
NSMutableArray results = (NSMutableArray)
this.editingContext().objectsWithFetchSpecification(fs);
System.out.println("TOTAL Result count is "+results.count());
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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