Re: Re: EOQualifier and boolean
Re: Re: EOQualifier and boolean
- Subject: Re: Re: EOQualifier and boolean
- From: "Joe Little" <email@hidden>
- Date: Fri, 1 Sep 2006 22:58:24 -0700
On 9/1/06, Joe Little <email@hidden> wrote:
On 9/1/06, Joe Little <email@hidden> wrote:
> I saw this recently on the list, but for whatever reason my string
> based qualifier isn't having an effect.
>
> I have some values that are integer in the DB (1 or 0) -- and others
> are boolean and appears as t or f in SQL results. Well, in my
> qualifier format string, I have things like "and checkedValue = 1" and
> that works. But "and checkedbooleanvalue = true" doesn't effectively
> work, but no errors come of it.
>
> Is there an obvious string based syntax that should work?
The EOQualifier has this entry, which may point to the problem:
Typically format strings include only two data types: strings and
numbers. Single quoted or double quoted strings correspond to String
objects in the argument array, non quoted numbers correspond to
Numbers, and non quoted strings are keys. You can get around this
limitation by performing explicit casting.
So. does anyone have an example of explicit casting here. I'm confused
as to how you'd cast the question of a boolean test into a qualifier
Progress. Seemed to have solved it. References in previous messages
referred to doing $@ when it should have been %@. dooat.
I have this:
//(mainqual is generated by a standard formatstr)
apptypequal = EOQualifier.qualifierWithQualifierFormat("honorsCoop =
%@", new NSArray(Boolean.FALSE));
The other trick was the NSArray bit which I missed the first go around.
_______________________________________________
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