Re: Mysterious field not reachable from entity error
Re: Mysterious field not reachable from entity error
- Subject: Re: Mysterious field not reachable from entity error
- From: Lachlan Deck <email@hidden>
- Date: Sat, 9 Sep 2006 00:28:29 +1000
Hi there,
On 04/09/2006, at 12:42 PM, Matt Kime wrote:
I have an object with the code below. When I try this search from a
WOComponent - EOQualifier.qualifierWithQualifierFormat
("hasOpeningPlusZeroDays
= 'true'" ,null);
Firstly (though not the issue) imho it's better to allow EOQualifier
to format your qualifier string for you for safer type conversion
(e.g., KVC benefits).
EOQualifier.qualifierWithQualifierFormat("hasOpeningPlusZeroDays = %
@", new NSArray(Boolean.TRUE));
or
new EOKeyValueQualifier("hasOpeningPlusZeroDays",
EOQualifier.QualifierOperatorEqual, Boolean.TRUE);
I get the error below. I don't understand why I'm
getting this error. hasOpeningPlusZero days is clearly reachable.
From your code yes... but
java.lang.IllegalStateException: sqlStringForKeyValueQualifier:
attempt to generate SQL for
com.webobjects.eocontrol.EOKeyValueQualifier (hasOpeningPlusZeroDays =
'true') failed because attribute identified by key
'hasOpeningPlusZeroDays' was not reachable from entity 'State'
it looks like there's some code you didn't show us. Are you using
this qualifier in a fetch specification somewhere?
with regards,
--
Lachlan Deck
_______________________________________________
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