{"action":"opened","issue":{"url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1040","labels_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1040/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1040/comments","events_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1040/events","html_url":"https://github.com/doctrine/mongodb-odm/issues/1040","id":59799617,"number":1040,"title":"Document hydration","user":{"login":"maschmann","id":157620,"avatar_url":"https://avatars.githubusercontent.com/u/157620?v=3","gravatar_id":"","url":"https://api.github.com/users/maschmann","html_url":"https://github.com/maschmann","followers_url":"https://api.github.com/users/maschmann/followers","following_url":"https://api.github.com/users/maschmann/following{/other_user}","gists_url":"https://api.github.com/users/maschmann/gists{/gist_id}","starred_url":"https://api.github.com/users/maschmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maschmann/subscriptions","organizations_url":"https://api.github.com/users/maschmann/orgs","repos_url":"https://api.github.com/users/maschmann/repos","events_url":"https://api.github.com/users/maschmann/events{/privacy}","received_events_url":"https://api.github.com/users/maschmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-04T13:49:25Z","updated_at":"2015-03-04T13:49:25Z","closed_at":null,"body":"I have a scenario where I get a document with many referenced and embedded documents from the db.\r\nWhen using a repo and the querybuilder there's the option to hydrate(false) to get the full dataset.\r\nIf I want it hydrated to an object, I'll receive a lot of proxies that are resolved \"on-the-fly\" when calling the according methods/ iterating the ArrayCollections.\r\nHow about doing a full hydration of all objects on hydrate('full') or something like that?\r\n\r\nWhat I want is to be able to cache the resulting object after hydration to buffer some of the load for my application. And still be able to use objects to work with, instead of arrays if  I skip hydration in favor of cacheable data.\r\nOr is there any other way to get a fully hydrated result?\r\n"}}