{"action":"created","issue":{"url":"https://api.github.com/repos/sokil/php-mongo/issues/73","labels_url":"https://api.github.com/repos/sokil/php-mongo/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/sokil/php-mongo/issues/73/comments","events_url":"https://api.github.com/repos/sokil/php-mongo/issues/73/events","html_url":"https://github.com/sokil/php-mongo/issues/73","id":56548534,"number":73,"title":"Relations - document object","user":{"login":"bobbygrossmann","id":1112025,"avatar_url":"https://avatars.githubusercontent.com/u/1112025?v=3","gravatar_id":"","url":"https://api.github.com/users/bobbygrossmann","html_url":"https://github.com/bobbygrossmann","followers_url":"https://api.github.com/users/bobbygrossmann/followers","following_url":"https://api.github.com/users/bobbygrossmann/following{/other_user}","gists_url":"https://api.github.com/users/bobbygrossmann/gists{/gist_id}","starred_url":"https://api.github.com/users/bobbygrossmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobbygrossmann/subscriptions","organizations_url":"https://api.github.com/users/bobbygrossmann/orgs","repos_url":"https://api.github.com/users/bobbygrossmann/repos","events_url":"https://api.github.com/users/bobbygrossmann/events{/privacy}","received_events_url":"https://api.github.com/users/bobbygrossmann/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-02-04T16:17:27Z","updated_at":"2015-02-08T18:42:20Z","closed_at":"2015-02-08T18:30:10Z","body":"I don't know if this a problem but i cant get this right. \r\n\r\nIm doing a token collection \"RELATION_BELONGS to UserCollection\" but the object i'm getting back \"$token->userRelations\" returns  \\Sokil\\Mongo\\Document Object and not \\Models\\UserDocument Object\r\nSo this results that i only can get _data but not any relation or relay the UserDocument object. \"resolvedRelationIds\" returns of course from Document Object and thats logic because it dosen't go inside the document object with relation().\r\n "},"comment":{"url":"https://api.github.com/repos/sokil/php-mongo/issues/comments/73424623","html_url":"https://github.com/sokil/php-mongo/issues/73#issuecomment-73424623","issue_url":"https://api.github.com/repos/sokil/php-mongo/issues/73","id":73424623,"user":{"login":"sokil","id":1829948,"avatar_url":"https://avatars.githubusercontent.com/u/1829948?v=3","gravatar_id":"","url":"https://api.github.com/users/sokil","html_url":"https://github.com/sokil","followers_url":"https://api.github.com/users/sokil/followers","following_url":"https://api.github.com/users/sokil/following{/other_user}","gists_url":"https://api.github.com/users/sokil/gists{/gist_id}","starred_url":"https://api.github.com/users/sokil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sokil/subscriptions","organizations_url":"https://api.github.com/users/sokil/orgs","repos_url":"https://api.github.com/users/sokil/repos","events_url":"https://api.github.com/users/sokil/events{/privacy}","received_events_url":"https://api.github.com/users/sokil/received_events","type":"User","site_admin":false},"created_at":"2015-02-08T18:42:20Z","updated_at":"2015-02-08T18:42:20Z","body":"Yes, and in most cases you even don't need to add classes, just regiser collection in map with required params like document class or query expression"}}