{"action":"closed","issue":{"url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/831","labels_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/831/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/831/comments","events_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/831/events","html_url":"https://github.com/doctrine/mongodb-odm/issues/831","id":30455462,"number":831,"title":"Get the document referenced via DRef with run a findAll() request","user":{"login":"Solidary","id":2437572,"avatar_url":"https://avatars.githubusercontent.com/u/2437572?v=3","gravatar_id":"","url":"https://api.github.com/users/Solidary","html_url":"https://github.com/Solidary","followers_url":"https://api.github.com/users/Solidary/followers","following_url":"https://api.github.com/users/Solidary/following{/other_user}","gists_url":"https://api.github.com/users/Solidary/gists{/gist_id}","starred_url":"https://api.github.com/users/Solidary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Solidary/subscriptions","organizations_url":"https://api.github.com/users/Solidary/orgs","repos_url":"https://api.github.com/users/Solidary/repos","events_url":"https://api.github.com/users/Solidary/events{/privacy}","received_events_url":"https://api.github.com/users/Solidary/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/doctrine/mongodb-odm/labels/question","name":"question","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2014-03-29T23:47:23Z","updated_at":"2015-03-15T20:13:46Z","closed_at":"2015-03-15T20:13:46Z","body":"Hi,\r\n\r\nI have a document which embedded many others documents. The problem is that in one embedded document i put a reference one to another embedded document.\r\n\r\nSurvey (document) => many  Item\r\nItem (embedded document) => reference one Item\r\n\r\nThe problem is when I run this query \r\n\r\n```\r\n$this->getServiceLocator()\r\n    ->get('doctrine.documentmanager.odm_default')\r\n    ->createQueryBuilder('Survey\\Document\\Survey')\r\n    ->field('id')->equals($id)\r\n    ->hydrate(false)\r\n    ->getQuery()\r\n    ->getSingleResult();\r\n```\r\n\r\nto get a survey I don't have the referenced one document. The field there over is empty.\r\n\r\nHow to get at least the id of the referenced document ?\r\n\r\nThanks."}}