{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1020","labels_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1020/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1020/comments","events_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1020/events","html_url":"https://github.com/doctrine/mongodb-odm/issues/1020","id":55749352,"number":1020,"title":"Selective Hydration","user":{"login":"renatomefidf","id":823634,"avatar_url":"https://avatars.githubusercontent.com/u/823634?v=3","gravatar_id":"","url":"https://api.github.com/users/renatomefidf","html_url":"https://github.com/renatomefidf","followers_url":"https://api.github.com/users/renatomefidf/followers","following_url":"https://api.github.com/users/renatomefidf/following{/other_user}","gists_url":"https://api.github.com/users/renatomefidf/gists{/gist_id}","starred_url":"https://api.github.com/users/renatomefidf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renatomefidf/subscriptions","organizations_url":"https://api.github.com/users/renatomefidf/orgs","repos_url":"https://api.github.com/users/renatomefidf/repos","events_url":"https://api.github.com/users/renatomefidf/events{/privacy}","received_events_url":"https://api.github.com/users/renatomefidf/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/doctrine/mongodb-odm/labels/question","name":"question","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-28T12:17:06Z","updated_at":"2015-05-04T19:18:40Z","closed_at":null,"body":"Hello,\r\n\r\nI'm using mongodb within an api, when I'm using hydrating to get a value this is my response:\r\n\r\n```json\r\n{\r\n    \"id\": \"54c8ca42eabc88400d8b4568\",\r\n    \"language\": {\r\n        \"id\": \"54b7bf0654064d33048b456d\",\r\n        \"last_update\": {\r\n            \"sec\": 1421328134,\r\n            \"inc\": 2\r\n        },\r\n        \"key\": \"pt-br\",\r\n        \"translations\": {\r\n           ...\r\n           ...\r\n           ...\r\n           ...\r\n           ...\r\n           ...\r\n           \"Lots of infos\"\r\n        }\r\n    },\r\n    \"key\": \"pt-br-key-test-4\",\r\n    \"value\": \"pt-br-value-test-4\"\r\n}\r\n```\r\n\r\nWhen the hydrate is false I get rid of the lot of infos, but my id is now \"protected\" as _id.\r\nIs there a way to hydrate only some references? And why id is a reference? Is it a mongodb way of work?\r\n```json\r\n{\r\n    \"_id\": {\r\n        \"$id\": \"54c8ca42eabc88400d8b4568\"\r\n    },\r\n    \"key\": \"pt-br-key-test-4\",\r\n    \"language\": {\r\n        \"$ref\": \"Language\",\r\n        \"$id\": {\r\n            \"$id\": \"54b7bf0654064d33048b456d\"\r\n        },\r\n        \"$db\": \"angular_symfony\"\r\n    },\r\n    \"value\": \"pt-br-value-test-4\"\r\n}\r\n```\r\n\r\nAnother thing that I was thinking about, is there a way to choose the depth of hydration? The main reason that I'm not hydrating this query is because of crossed references bringing more data that I want, if I was able to choose only 1 level of depth this would be great!\r\n\r\nThank you"},"comment":{"url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/comments/98822247","html_url":"https://github.com/doctrine/mongodb-odm/issues/1020#issuecomment-98822247","issue_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1020","id":98822247,"user":{"login":"renatomefidf","id":823634,"avatar_url":"https://avatars.githubusercontent.com/u/823634?v=3","gravatar_id":"","url":"https://api.github.com/users/renatomefidf","html_url":"https://github.com/renatomefidf","followers_url":"https://api.github.com/users/renatomefidf/followers","following_url":"https://api.github.com/users/renatomefidf/following{/other_user}","gists_url":"https://api.github.com/users/renatomefidf/gists{/gist_id}","starred_url":"https://api.github.com/users/renatomefidf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renatomefidf/subscriptions","organizations_url":"https://api.github.com/users/renatomefidf/orgs","repos_url":"https://api.github.com/users/renatomefidf/repos","events_url":"https://api.github.com/users/renatomefidf/events{/privacy}","received_events_url":"https://api.github.com/users/renatomefidf/received_events","type":"User","site_admin":false},"created_at":"2015-05-04T19:18:40Z","updated_at":"2015-05-04T19:18:40Z","body":"@malarzm I believe not, how can I check it?"}}