Hello.

I have this model:
class MyModel(models.Model):
    string = models.CharField(max_length=96,unique=True,db_index=True)
    mother=models.ForeignKey('self',null=True,blank=True)
 
top=models.ForeignKey('self',null=True,blank=True,related_name="Top")

I need to make a query which will return all those instances where
mother and top is the same. Is this possible using the orm, or do I
need to use raw?

Thanks!

Odd-R.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to