On Mon, 2007-10-08 at 13:31 +0000, [EMAIL PROTECTED] wrote:
> Ok..thanks.. I was afraid I was going to get that answer.  If I do
> this with select_related, I'm still going to have to implement a loop
> to display them all in one list, because they'd come back as
> company.parent_company.parent_company etc, instead of all in one top
> level list... right?

Yes. You're going to have to do that at some point. Either you construct
the flattened version in Python or you do it with custom SQL (which
would require a loop in an SQL procedural language in any case). There's
no magical way to make the right data structure appear just with a
relational query.

Regards,
Malcolm


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to