Re: using an int for a EOQualifier
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