to-many keypath qualifying, weird problem
to-many keypath qualifying, weird problem
- Subject: to-many keypath qualifying, weird problem
- From: Jonathan Rochkind <email@hidden>
- Date: Tue, 22 Jul 2003 12:43:44 -0500
I'm getting some weird exceptions when I try to qualify over a to-many
keypath, which don't make any sense to me.
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 );
If I do a raw row fetch on just some attributes, this works. But if I do a
full search, it does not. The objectsWithFetchSpecification raises this
exception:
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?
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.
Any ideas here?
--Jonathan
_______________________________________________
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.