• 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: using an int for a EOQualifier
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: using an int for a EOQualifier


  • Subject: Re: using an int for a EOQualifier
  • From: Dev WO <email@hidden>
  • Date: Wed, 7 Dec 2005 23:09:15 +0100


On 7-Dec-05, at 4:27 PM, Dev WO wrote:

Hi guys,
I'm actually having issue using an int in a qualifier.
I have:
=======
args = new NSMutableArray();
args.addObject(String.valueOf(2005));
EOQualifier qual = EOQualifier.qualifierWithQualifierFormat ("(years.name like %@) and (projectCategory.position = '1')", args);
fetchSpecProjectNow1 = new EOFetchSpecification("Project", qual, null);
=======


but it complains about "The attribute name should be assigned a Number, but the value was the String "2005""

I'm probably doing something stupid due to my (lack of) knowledge;)

If anyone could point me to my mistake:)

To give all the info as I may get more issue:
I have an eo object of type Project
this entity has relationship a to-many relationship to a Year object. So project can be affected to different years.
I need to generate a list of project that are affected to a specific year.

The name attribute for the Year entity is a Number not a String?

If so then you should be doing:

args = new NSMutableArray();
args.addObject(new Integer(2005));
EOQualifier qual = EOQualifier.qualifierWithQualifierFormat ("(years.name = %@) and (projectCategory.position = '1')", args);
fetchSpecProjectNow1 = new EOFetchSpecification("Project", qual, null);



-- ;david

Thanks David, it works:) I'll finish all that tomorrow to make sure I won't have any more issue;)

Xavier

_______________________________________________
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: 
 >using an int for a EOQualifier (From: Dev WO <email@hidden>)
 >Re: using an int for a EOQualifier (From: David LeBer <email@hidden>)

  • Prev by Date: Re: using an int for a EOQualifier
  • Next by Date: Re: _EOCheapCopyMutableArray blocks
  • Previous by thread: Re: using an int for a EOQualifier
  • Next by thread: Re: using an int for a EOQualifier
  • Index(es):
    • Date
    • Thread