Re: Another fault issue???
Re: Another fault issue???
- Subject: Re: Another fault issue???
- From: Chuck Hill <email@hidden>
- Date: Thu, 5 Apr 2007 10:42:43 -0700
Try this:
On Apr 5, 2007, at 10:30 AM, James Cicenia wrote:
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){
if (editingContext() != portfolio.editingContext()) {
throw new RuntimeException("Whoa Dude! You're like crossing
editing contexts or something");
}
:-P
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@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
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