• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
To Many relationship error
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

To Many relationship error


  • Subject: To Many relationship error
  • From: Jeff & Monica Schmitz <email@hidden>
  • Date: Tue, 2 May 2006 22:49:05 -0500

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: To Many relationship error
      • From: Ken Anderson <email@hidden>
  • Prev by Date: Re: Want to iterate over items in EditingContext for validation before save
  • Next by Date: Re: beginner question - on publishing web service using web object
  • Previous by thread: Re: beginner question - on publishing web service using web object
  • Next by thread: Re: To Many relationship error
  • Index(es):
    • Date
    • Thread