I think what you might want to do is something like this: a_query=select([a_table,b_table], b_table.c.sometext!='NOTHISONE').alias('a_query') mapper(AObject, q_query)
Hermann Himmelbauer wrote: > Hi, > I'm wondering if the following is possible with mappers: > > I have two tables A and B, whereas B is referenced by A. What I need is a > special mapper for A that returns all referenced rows in B except those, that > have a specific value in one column of the row, e.g.: > > Table A: > id, sometext, reftoB > 1, xyz, 1 > 2, abc, 2 > > Table B: > id, sometext > 1, foo > 2, NOTTHISONE <- Should not be returned by the mapper > > Is there a simple way to achieve this? > > Best Regards, > Hermann > > -- > [EMAIL PROTECTED] > GPG key ID: 299893C7 (on keyservers) > FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7 > > > > > -- David Gardner Pipeline Tools Programmer, "Sid the Science Kid" Jim Henson Creature Shop (323) 802-1717 [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---