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

Re: Another fault issue???


  • Subject: Re: Another fault issue???
  • From: James Cicenia <email@hidden>
  • Date: Thu, 5 Apr 2007 13:44:47 -0500

all I can say is d'oh!

smacks his head.


On Apr 5, 2007, at 12:42 PM, Chuck Hill wrote:

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
References: 
 >Another fault issue??? (From: James Cicenia <email@hidden>)
 >Re: Another fault issue??? (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: I don't get it.(was delete statement)
  • Next by Date: Re: I don't get it.(was delete statement)
  • Previous by thread: Re: Another fault issue???
  • Next by thread: Updating Nested To-Many Relationship
  • Index(es):
    • Date
    • Thread