{"action":"opened","issue":{"url":"https://api.github.com/repos/otto-de/edison-microservice/issues/16","repository_url":"https://api.github.com/repos/otto-de/edison-microservice","labels_url":"https://api.github.com/repos/otto-de/edison-microservice/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/otto-de/edison-microservice/issues/16/comments","events_url":"https://api.github.com/repos/otto-de/edison-microservice/issues/16/events","html_url":"https://github.com/otto-de/edison-microservice/issues/16","id":186777690,"number":16,"title":"AbstractMongoRepository.byId returns matchAll equivalent Document if key is null","user":{"login":"tschniewind","id":23178463,"avatar_url":"https://avatars.githubusercontent.com/u/23178463?v=3","gravatar_id":"","url":"https://api.github.com/users/tschniewind","html_url":"https://github.com/tschniewind","followers_url":"https://api.github.com/users/tschniewind/followers","following_url":"https://api.github.com/users/tschniewind/following{/other_user}","gists_url":"https://api.github.com/users/tschniewind/gists{/gist_id}","starred_url":"https://api.github.com/users/tschniewind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschniewind/subscriptions","organizations_url":"https://api.github.com/users/tschniewind/orgs","repos_url":"https://api.github.com/users/tschniewind/repos","events_url":"https://api.github.com/users/tschniewind/events{/privacy}","received_events_url":"https://api.github.com/users/tschniewind/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-02T11:38:23Z","updated_at":"2016-11-02T11:38:23Z","closed_at":null,"body":"    protected Document byId(final K key) {\r\n        return key != null ? new Document(ID, key.toString()) : new Document();\r\n    }\r\nFor example if I call `AbstractMongoRepository.delete(null)` it results in deleting the first document that would be found by matchAll, and it is not possible to delete a document with an _id=null (except it is the first document found by matchAll).\r\n\r\nSo the implementation should be changed to:\r\n    \r\n    protected Document byId(final K key) {\r\n        return key != null ? new Document(ID, key.toString()) : new Document(ID, null);\r\n    }\r\n\r\n"}}
{"actor":{"display_login":"tschniewind"}}