On 11/4/06, Andrew Grover <[EMAIL PROTECTED]> wrote:
But how is this possible?
def _get_groups(self):
return Group.selectBy(user_id=self.ID)
This is what you mean? I would like to have how to filter/order a MultipleJoin in a simplier way rather than creating a _get_* for avery join.
Regards.
On 11/4/06, kerinin <[EMAIL PROTECTED]> wrote:
> but i would prefer to let the database take care of this. i've tried
> this:
>
> select = Group.select (NOTIN(Group.q.id, user.groups))
>
> but user.groups is a list, not a select query, so it fails.
Make them SQLRelatedJoins instead of RelatedJoins. This means that
user.groups will be a SelectResult not a list, and I'd think you could
do:
new_results = user.groups.filter(NOTIN(Group.q.id, list(user.groups)))
But how is this possible?
def _get_groups(self):
return Group.selectBy(user_id=self.ID)
This is what you mean? I would like to have how to filter/order a MultipleJoin in a simplier way rather than creating a _get_* for avery join.
Regards.
Something like that?
HTH -- Andy
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---
- [TurboGears] How can i select RelatedJoins by exclusion (IE,... kerinin
- [TurboGears] Re: How can i select RelatedJoins by exclu... Andrew Grover
- [TurboGears] Re: How can i select RelatedJoins by e... Julio Oña

