• 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
Re: to-many keypath qualifying, weird problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: to-many keypath qualifying, weird problem


  • Subject: Re: to-many keypath qualifying, weird problem
  • From: Art Isbell <email@hidden>
  • Date: Tue, 22 Jul 2003 11:13:18 -1000

On Tuesday, July 22, 2003, at 07:43  AM, Jonathan Rochkind wrote:

I have Person with a flattened to-many called "subjects" to Subject. The expansion of the flattened to-many would be "toPersonSubjects.toSubject".

I set up a qualifier on the "subjects" relationship like:
NSArray args = new NSArray( someSubject );
iQual = EOQualifier.qualifierWithQualifierFormat(" subjects = %@ ", args );

This looks incorrect. "subjects" is an array of subjects but "%@" resolves to one subject. So your qualifier is comparing an array of subjects to one subject.


sqlStringForKeyValueQualifier: attempt to generate SQL for com.webobjects.eocontrol.EOKeyValueQualifier (toPerson.toPersonSubjects.toSubjects = (Subject)'[toString of a Subject goes here] failed because attribute identified by key 'toPerson.toPersonSubjects.toSubjects' was not reachable from from entity 'PersonGrades'

Questions:
1) Why does it tell me the EOKeyValueQualifier keypath is "toPerson.toPersonSubjects.toSubjects". I'd think it would just be "toPersonSubjects.toSubjects", the expansion of my flattened relationship?

This could happen if the qualifier is being used in a fetch spec against the PersonGrades entity.


2) Wait, but the final message says "from entity PersonGrades". That's weird, since that's a _different_ join object, involved in a different flattened relationship. But okay, from that entity, "toPerson.toPersonSubjects.toSubjects" _should_ be a valid keypath. So why does it say it's not reachable? It should be reachable.

I've had problems with paths that include more than one to-many relationship.


Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Locking exceptions and more
  • Next by Date: Re: Local ECs (was Re: Can't modify EO objects! ARGH! =()
  • Previous by thread: to-many keypath qualifying, weird problem
  • Next by thread: worked around: Re: to-many keypath qualifying, weird problem
  • Index(es):
    • Date
    • Thread