• 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
Another fault issue???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another fault issue???


  • Subject: Another fault issue???
  • From: James Cicenia <email@hidden>
  • Date: Thu, 5 Apr 2007 12:30:58 -0500

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Another fault issue???
      • From: Chuck Hill <email@hidden>
    • Re: Another fault issue???
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Re: How to Retrieve Session User?
  • Next by Date: Re: How to Retrieve Session User?
  • Previous by thread: Re: I don't get it.(was delete statement)
  • Next by thread: Re: Another fault issue???
  • Index(es):
    • Date
    • Thread