Is there a way to select from a related join using a conditional?

For example suppose the User class has a related join called 'friends'.

class User:
...
   friends = relatedJoin(...)

Is there a way to do a select on all Users that have a certain user
matching a person in their friends list?

pseudocode would be something like this:
>model.User.select(not userObj.friends.__contains__(model.User.q.id))


Right now I get all the friends and then do the stripping afterwards
(this is also how fasttrack handles the project archived/not archived)
on the returned list.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to