2012-11-24 15:26:37 UTC
i've been searching all along the internet.
So this List is my last resort. ;)
I'v got Users in Groups. Now i want to eMail all Users not in Group
"Admins". So i need something similar like this:
SELECT u.email, u.name FROM Users u
LEFT OUTER JOIN Groups g ON u.id = g.uid AND g.id = ADMIN-GROUP-ID
WHERE g.id IS NULL
After searching around this COULD easily be done with a relationship,
beside the problem, that you cannot give in the custom-group id. So i
could only create a relationship like "all_users_not_in_admingroup" but
can't create a general relationsship like "all_users_not_in_groupX"?
Any ideas on how to solve this problem with DBIC?
I know about the CODEREF-Option for defining Relationship-Conditions.
But they don't seem to solve my problem, right?