Although an old thread, I think it is still relevant.

postgresql does support recursive queries 
http://www.postgresql.org/docs/8.4/static/queries-with.html

And while not directly support by Django's ORM, could be done using the 
extra clause. Might be an interesting experiment to create a custom manager 
that could perform such queries.

On Tuesday, March 18, 2008 7:52:21 AM UTC-5, Nacho wrote:
>
> I have a category table in my models such as 
>
> class Category(models.Model): 
>     parent = ForeignKey('self') 
>     name = CharField(maxlength=30) 
>
> I would like to, being in an item, be able to get all his lineage. 
>
> Is there any way of doing this with django? 
>
> Thank you, 
>
> Regards

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to