On Jul 6, 2008, at 11:33 AM, [EMAIL PROTECTED] wrote:
> > i have some tree-walking query via many2many, having configurable > levels of > hops to look into. > and it returns very different results for len(query) and > query.count(): len() > stays constant above the depth of the tree (correct), while .count() > keeps > growing an growing. > what's can be wrong? the generated SQL will tell all, lately ive been partial towards: sess.query(func.count(func.distinct(MyClass.id))).<other criterion>.first() since the way count() is determined can be controlled accurately. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---