somethings not right with that example. are you sure youre saying "query.select_by(login='dschulz')" exactly that way ? (i.e. using a single = sign). that error message should be impossible since 'login' is a keyword argument name.
also if by "filter the users" you mean "select all users whos login name is 'dschulz'", well normally what you have there would be an appropriate method of doing that, however your mapping is a little tweaky in that you are mapping to the same related class twice, and the "select_by" method is not smart enough to query against both relationships. so you might want to go more along the lines of (im paraphrasing your attribute names since theyre a little cumbersome): query.select( and_(usertable.c.login=='dschulz', or_(usertable.c.user_id==purchasetable.c.creator_id, usertable.c.user_id==purchasetable.c.requestor_id) ) ) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---