qualifier using a relationship
qualifier using a relationship
- Subject: qualifier using a relationship
- From: Nathan Dumar <email@hidden>
- Date: Tue, 15 Jun 2004 18:03:56 -0400
After some playing around with EOModeler, I think I've figured out the
source of my fetch difficulties. I can't qualify using a relationship.
Here's an example:
Family to User is one-to-many (relationship named users)
User to Family is many-to-one (relationship named family)
If I build a fetch spec in the user entity to fetch only the users in a
specific family, using the relationship called family and a family
object (family = $famObj), the SQL generated is "WHERE k_from_family is
NULL" instead of the usual question mark to indicate a variable.
(k_from_family is the foreign key in User.)
(family.familyKey = $famKey) produces "WHERE family_key = ? AND
k_from_family = family_key." Assuming (yikes!) this will work, I guess
I'll just have to use keys to qualify through a relationship.
Any feedback on this is invited. I figure I'm probably missing
something obvious through lack of experience.
Thank you,
Nathan
_______________________________________________
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.