OK -
Here is another one that is driving me a bit crazy...
I have a user eo. In that user eo I have a toMany relationship to a
groups table.
I have the following code:
public PortfolioUserGroup portfolioGroup(Portfolio portfolio){
for (int i = 0;i<portfolioUserGroups().count();i++){
PortfolioUserGroup pug = (PortfolioUserGroup)portfolioUserGroups
().objectAtIndex(i);
System.out.println("Portfolio Name
"+pug.portfolio().title());
}
EOQualifier myQualifier2;
NSMutableArray args2 = new NSMutableArray();
args2.addObject("portfolio");
args2.addObject(portfolio);
myQualifier2 = EOQualifier.qualifierWithQualifierFormat("%@ = %@",
args2);
NSArray results = EOQualifier.filteredArrayWithQualifier
(portfolioUserGroups(),myQualifier2);
if(results.count()>1){
System.out.println("ERROR: More than one portfolio_tos_usergroup
record for user "+this.fullName()+" and portfolio "+portfolio.title());
return null;
}else if (results.count()==0){
System.out.println("ERROR: No portfolio_tos_usergroup record for
user "+this.fullName()+" and portfolio "+portfolio.title());
return null;
}
return (PortfolioUserGroup)results.objectAtIndex(0);
}
This is bringing back 0 records. Yet when I checked the output via
the output above I get:
I am definitely confused here... it is showing it clear as day ! ???
Any thoughts would be greatly appreciated.
James Cicenia
Portfolio Name IT Projects
Portfolio Name IT/Infrastructure
Portfolio Name Student Finance Project
Portfolio Name IT Projects
Portfolio Name IT/Infrastructure
Portfolio Name Student Finance Project
Portfolio Name IT Projects
Portfolio Name IT/Infrastructure
Portfolio Name Student Finance Project
Portfolio Name IT Projects
Portfolio Name IT/Infrastructure
Portfolio Name Student Finance Project
ERROR: No portfolio_tos_usergroup record for user Bob Correll and
portfolio IT Projects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]