Relationship Where clauses
-
Hi Jim, any resource online on how to use the WHERE clause?
Imagine I have an object (pod), called cat, it has a name and gender, mother, father and descendents.I have 3 fields as relationships, mother, father, and descendents.
- mother is a simple relationship to the same cat pod, but WHERE gender = female
- father is a simple relationship to the same cat pod, but WHERE gender = male
- descendents is a multiple relationship to the same cat pod, but WHERE not in mother and father ids, (bi-direccional relationship to cat, linked to the father and mother fields.)
I was able to achieve half the requirements by adding on the where clause this:
gender.meta_value = ‘f’and for the father, gender.meta_value = ‘m’In the form list, I would like to remove the entries of the item i’m editing from the father/mother list.
ex. If I’m editing the cat pod named “garfield” and since he’s male, how can I remove it from the father list? how can I remove it from the descendents list?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Relationship Where clauses’ is closed to new replies.