{"action":"created","issue":{"url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1363","repository_url":"https://api.github.com/repos/doctrine/mongodb-odm","labels_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1363/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1363/comments","events_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1363/events","html_url":"https://github.com/doctrine/mongodb-odm/pull/1363","id":133539297,"number":1363,"title":"Prepare field's value for references","user":{"login":"malarzm","id":4947711,"avatar_url":"https://avatars.githubusercontent.com/u/4947711?v=3","gravatar_id":"","url":"https://api.github.com/users/malarzm","html_url":"https://github.com/malarzm","followers_url":"https://api.github.com/users/malarzm/followers","following_url":"https://api.github.com/users/malarzm/following{/other_user}","gists_url":"https://api.github.com/users/malarzm/gists{/gist_id}","starred_url":"https://api.github.com/users/malarzm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malarzm/subscriptions","organizations_url":"https://api.github.com/users/malarzm/orgs","repos_url":"https://api.github.com/users/malarzm/repos","events_url":"https://api.github.com/users/malarzm/events{/privacy}","received_events_url":"https://api.github.com/users/malarzm/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/doctrine/mongodb-odm/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/doctrine/mongodb-odm/milestones/12","html_url":"https://github.com/doctrine/mongodb-odm/milestones/1.1","labels_url":"https://api.github.com/repos/doctrine/mongodb-odm/milestones/12/labels","id":1386633,"number":12,"title":"1.1","description":"","creator":{"login":"malarzm","id":4947711,"avatar_url":"https://avatars.githubusercontent.com/u/4947711?v=3","gravatar_id":"","url":"https://api.github.com/users/malarzm","html_url":"https://github.com/malarzm","followers_url":"https://api.github.com/users/malarzm/followers","following_url":"https://api.github.com/users/malarzm/following{/other_user}","gists_url":"https://api.github.com/users/malarzm/gists{/gist_id}","starred_url":"https://api.github.com/users/malarzm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malarzm/subscriptions","organizations_url":"https://api.github.com/users/malarzm/orgs","repos_url":"https://api.github.com/users/malarzm/repos","events_url":"https://api.github.com/users/malarzm/events{/privacy}","received_events_url":"https://api.github.com/users/malarzm/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":23,"state":"open","created_at":"2015-10-31T10:52:41Z","updated_at":"2016-02-14T13:42:51Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-02-14T13:27:08Z","updated_at":"2016-02-14T17:54:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/doctrine/mongodb-odm/pulls/1363","html_url":"https://github.com/doctrine/mongodb-odm/pull/1363","diff_url":"https://github.com/doctrine/mongodb-odm/pull/1363.diff","patch_url":"https://github.com/doctrine/mongodb-odm/pull/1363.patch"},"body":"This is a subset of ODM preparing query according to field's mapping, but as it's bigger thing here's small part that is cool enough to make its way to 1.1 already - now one can query for references without using query builder! It even doesn't matter if reference is one or many, simple or not:\r\n\r\n```\r\n$dm->getRepository(User::class)->findOneBy(['account' => $account]);\r\n$dm->getRepository(User::class)->findBy(['groups' => $group]);\r\n```\r\n\r\nAdditionally to being nice it should fix https://github.com/doctrine/DoctrineMongoDBBundle/issues/208 and close #292 :)"},"comment":{"url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/comments/183938569","html_url":"https://github.com/doctrine/mongodb-odm/pull/1363#issuecomment-183938569","issue_url":"https://api.github.com/repos/doctrine/mongodb-odm/issues/1363","id":183938569,"user":{"login":"malarzm","id":4947711,"avatar_url":"https://avatars.githubusercontent.com/u/4947711?v=3","gravatar_id":"","url":"https://api.github.com/users/malarzm","html_url":"https://github.com/malarzm","followers_url":"https://api.github.com/users/malarzm/followers","following_url":"https://api.github.com/users/malarzm/following{/other_user}","gists_url":"https://api.github.com/users/malarzm/gists{/gist_id}","starred_url":"https://api.github.com/users/malarzm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malarzm/subscriptions","organizations_url":"https://api.github.com/users/malarzm/orgs","repos_url":"https://api.github.com/users/malarzm/repos","events_url":"https://api.github.com/users/malarzm/events{/privacy}","received_events_url":"https://api.github.com/users/malarzm/received_events","type":"User","site_admin":false},"created_at":"2016-02-14T17:54:09Z","updated_at":"2016-02-14T17:54:09Z","body":"Should work already, but won't be as smart as `references` after #1333 and I'm not sure yet whether it should :)"}}