From: <mic...@ya...> - 2004-06-01 16:37:30
|
Hi guys! I want some help with this join: class Person(SQLObject): name=StringCol(length=100) specific_areas=RelatedJoin('SpecificArea') class GeneralArea(SQLObject): name=StringCol(length=50) specific_areas=MultipleJoin('SpecificArea') class SpecificArea(SQLObject): name=StringCol(length=50) general_area=ForeignKey('GeneralArea') people=RelatedJoin('Person') I want to use some join like this: select * from person p inner join person_specific_area x on p.id=x.person_id inner join specific_area s on s.id=x.specific_area_id inner join gereral_area g on s.general_area_id=g.id; I don´t try it, but I think the join it´s the above, I want to add some restrictions on it: 'where s.id=someid' (I want to filter people by his specific_areas). I can use the IN() function of the SQLBuilder, but I can´t create the join with the 2 tables, I don´t know what may I pass to Person.select()... thanks for all help and sorry about my poor english! ===== -- Michel Thadeu Sabchuk Curitiba/PR ______________________________________________________________________ Participe da pesquisa global sobre o Yahoo! Mail: http://br.surveys.yahoo.com/global_mail_survey_br |