Jeff,

It sounds like the model you're using doesn't match the code.  Are you sure the model is correct and up to date?  Also, what is the superclass of your Author class?

Ken

On May 2, 2006, at 11:49 PM, Jeff & Monica Schmitz wrote:

I'm going through the Visual Quick Start Guide tutorial and I've set up a to-many relationship in EOModeler, along with the to-one relationship in the opposite direction.  While the to-one relationship works, I get the following error when accessing the generated java function to get the destination of the to-many relationship:

Error:
com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: valueForKey(): lookup of unknown key: 'articles'. This class does not have an instance variable of the name articles or _articles, nor a method of the name articles, _articles, getArticles, or _getArticles
Reason:
<Author 0xa47962> valueForKey(): lookup of unknown key: 'articles'. This class does not have an instance variable of the name articles or _articles, nor a method of the name articles, _articles, getArticles, or _getArticles

...
at Author.articles(Author.java:44)
...

The generated function (in Author.java) in which the error is being generated looks like this:

    public NSArray articles() {
        return (NSArray)storedValueForKey("articles");
    }

I did do a drop and recreation of all my tables before running but still get the error.  What I don't understand is from the error message it sounds like the storedValueForKey call is recursively looking for the function in which it resides (Author.aticles) and can't find itself.  First, why is it looking for itself, and second, why can't it find itself?  Any ideas out there?

Thanks,
Jeff
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to