I need some advice. I'm struggling with a query that spans 4 tables. "Struggling" is a bad word; I'll explain later. Django uses a model- oriented query system together with a Foreign Key manager to get to the "next" joining table. A query that spans several tables results in a deeply nested loop. Hence, my struggle. I have an aversion to writing deeply nested loops. It's an indication that I dont quite understand my problem. In SQL, you join the tables you need depending on the query and you filter out entries you are interested in with a WHERE clause. It's an idea I'm familiar with; it's "flat", ie, not nested. When I see deeply nested loops, I tend to think recursion. But that doesnt work either since at each level, the operation is model-specific. I need some general advice on how folks handle queries on joined tables within the django framework. Since queries are model based, is it better to forget about constructing related but orthogonal tables and simply throw everything in a model?
Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

