{"action":"opened","issue":{"url":"https://api.github.com/repos/heywbj/django-rest-framework-recursive/issues/7","labels_url":"https://api.github.com/repos/heywbj/django-rest-framework-recursive/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/heywbj/django-rest-framework-recursive/issues/7/comments","events_url":"https://api.github.com/repos/heywbj/django-rest-framework-recursive/issues/7/events","html_url":"https://github.com/heywbj/django-rest-framework-recursive/issues/7","id":103199824,"number":7,"title":"Run raw queries","user":{"login":"ctippur","id":2225047,"avatar_url":"https://avatars.githubusercontent.com/u/2225047?v=3","gravatar_id":"","url":"https://api.github.com/users/ctippur","html_url":"https://github.com/ctippur","followers_url":"https://api.github.com/users/ctippur/followers","following_url":"https://api.github.com/users/ctippur/following{/other_user}","gists_url":"https://api.github.com/users/ctippur/gists{/gist_id}","starred_url":"https://api.github.com/users/ctippur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctippur/subscriptions","organizations_url":"https://api.github.com/users/ctippur/orgs","repos_url":"https://api.github.com/users/ctippur/repos","events_url":"https://api.github.com/users/ctippur/events{/privacy}","received_events_url":"https://api.github.com/users/ctippur/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-26T07:44:47Z","updated_at":"2015-08-26T07:44:47Z","closed_at":null,"body":"Hello,\r\n\r\nI need to be able to run query on a recursive model that gives the name of the parent and child\r\n\r\nMy model\r\n\r\nclass RecursiveModel(models.Model):\r\n   stage_title = models.CharField(max_length=255, unique=True)\r\n    parent = models.ForeignKey('self', null=True)\r\n\r\nI need to get the names of parent and child relationship\r\nEquivalant query being:\r\n\r\nselect c.id, c.stage_title as child, p.stage_title as parent from recursivemodel c, recursivemodel p  where c.parent_id=p.id\r\n\r\nHow do I do that?\r\n\r\n- Shekar\r\n\r\n"}}