On Mon, Sep 8, 2008 at 4:48 PM, Diez B. Roggisch <[EMAIL PROTECTED]> wrote:
> I'm feeling a bit stupid right now - but somehow, I don't manage to join over > a ManyToMany-relationship. > > I have Users, and they have a many-to-many relationship to Documents > called "sharers". Documents also have an owner. > > Now how would I go for a list of users that are sharers of a user's documents? > Something like this: > > User.query.join(Document.sharers).filter(Document.owner == some_user) It might be a simple typo in your email, but shouldn't that be: User.query.join(User.sharers).filter(Document.owner == some_user) > This obviously is not working. If this was not the problem, please describe in more details what kind of problem (traceback, ...) your are having... -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SQLElixir" 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/sqlelixir?hl=en -~----------~----~----~----~------~----~------~--~---
