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: Art Isbell <email@hidden>
- Date: Mon, 4 Sep 2006 08:57:53 -1000
On Sep 3, 2006, at 4: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); I get the error below. I don't understand why I'm
getting this error. hasOpeningPlusZero days is clearly reachable.
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'
The exception states that your code is attempting to generate SQL
and that the key "hasOpeningPlusZeroDays" was not reachable from
entity "State". I don't know what your eomodel looks like, but it
appears that hasOpeningPlusZeroDays is a method in State.java rather
than an attribute of the State entity; i.e., it does not map to a
database column. And the code that is causing this exception appears
to be qualifying against the database (therefore, the SQL generation)
rather than in memory. If my assumptions are true, then there's no
"hasOpeningPlusZeroDays" attribute in the "State" entity, so
hasOpeningPlusZeroDays is unreachable.
Aloha,
Art
_______________________________________________
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