From: Michel T. <mic...@ya...> - 2004-12-02 03:05:09
|
Hi people! See this: >>> class Barrel(SQLObject): ... monkeys=MultipleJoin('Monkey') ... >>> class Monkey(SQLObject): ... barrel=ForeignKey('Barrel') ... >>> barrel=Barrel() >>> monkey=Monkey(barrel=barrel) >>> isinstance(barrel.monkeys, (list, tuple)) True Why this is true? Why can't the join return a select object, this way, if I need to count the monkeys of a barrel, I can use barrel.monkeys.count(), I can use sum() and other aggregate function I want... The actual way I need to rewrite the join to be able to apply these aggregate functions, or I use python to calculate what I need... Is there a disvantage on using python to make the calculation? Does my worry has foundation? Thanks for all help! ===== -- Michel Thadeu Sabchuk Curitiba/PR _______________________________________________________ Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/ |