Re: get children of children

2008-09-24 Thread krylatij
You can also try django-mptt, that works great with object hierarchy http://code.google.com/p/django-mptt/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: get children of children

2008-09-24 Thread Evgeny
On Sep 24, 11:49 am, "Matthias Kestenholz" <[EMAIL PROTECTED]> wrote: > You probably mean this: > C.objects.filter(id_b__id_a__exact=1) > Maybe you meant A is referenced by B? Yes, exactly this. --~--~-~--~~~---~--~~ You received this message because you are s

Re: get children of children

2008-09-24 Thread Matthias Kestenholz
On Wed, Sep 24, 2008 at 9:25 AM, Evgeny <[EMAIL PROTECTED]> wrote: > > Hi, > There's an object hierarchy: A references B, B references C. > "references" means foreign key. > Is there a nice Django way to select all C objects which are > grandchilds of given A with one query? Somethink like > > sel

get children of children

2008-09-24 Thread Evgeny
Hi, There's an object hierarchy: A references B, B references C. "references" means foreign key. Is there a nice Django way to select all C objects which are grandchilds of given A with one query? Somethink like select C.* from C join B on B.id = C.id_b join A on A.id = B.id_a where A.id = 1 i.e