{"action":"created","issue":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1507","repository_url":"https://api.github.com/repos/mapstruct/mapstruct","labels_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1507/labels{/name}","comments_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1507/comments","events_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1507/events","html_url":"https://github.com/mapstruct/mapstruct/pull/1507","id":326240110,"number":1507,"title":"#1497 create referenced mapper without injection","user":{"login":"chris922","id":3875742,"avatar_url":"https://avatars3.githubusercontent.com/u/3875742?v=4","gravatar_id":"","url":"https://api.github.com/users/chris922","html_url":"https://github.com/chris922","followers_url":"https://api.github.com/users/chris922/followers","following_url":"https://api.github.com/users/chris922/following{/other_user}","gists_url":"https://api.github.com/users/chris922/gists{/gist_id}","starred_url":"https://api.github.com/users/chris922/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chris922/subscriptions","organizations_url":"https://api.github.com/users/chris922/orgs","repos_url":"https://api.github.com/users/chris922/repos","events_url":"https://api.github.com/users/chris922/events{/privacy}","received_events_url":"https://api.github.com/users/chris922/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-24T18:31:33Z","updated_at":"2018-05-24T20:14:42Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mapstruct/mapstruct/pulls/1507","html_url":"https://github.com/mapstruct/mapstruct/pull/1507","diff_url":"https://github.com/mapstruct/mapstruct/pull/1507.diff","patch_url":"https://github.com/mapstruct/mapstruct/pull/1507.patch"},"body":"Added a new attribute `usesPlain` to `@Mapper` and `@MapperConfig` that could be used in the same way like `uses`, but it will ensure that the target type will not be injected, even if the component model was set to `spring` or similar. It will always create a new instance of this type."},"comment":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/comments/391844833","html_url":"https://github.com/mapstruct/mapstruct/pull/1507#issuecomment-391844833","issue_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/1507","id":391844833,"user":{"login":"sjaakd","id":6173283,"avatar_url":"https://avatars0.githubusercontent.com/u/6173283?v=4","gravatar_id":"","url":"https://api.github.com/users/sjaakd","html_url":"https://github.com/sjaakd","followers_url":"https://api.github.com/users/sjaakd/followers","following_url":"https://api.github.com/users/sjaakd/following{/other_user}","gists_url":"https://api.github.com/users/sjaakd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjaakd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjaakd/subscriptions","organizations_url":"https://api.github.com/users/sjaakd/orgs","repos_url":"https://api.github.com/users/sjaakd/repos","events_url":"https://api.github.com/users/sjaakd/events{/privacy}","received_events_url":"https://api.github.com/users/sjaakd/received_events","type":"User","site_admin":false},"created_at":"2018-05-24T20:14:42Z","updated_at":"2018-05-24T20:14:42Z","author_association":"CONTRIBUTOR","body":"> You might be right that this will only be used for (generated) objectfactories, but just because we don't see a different use-case right now, why should we restrict for what this attribute can be used? Maybe some other user needs it for something else. Technically there is no such restriction required.\r\n\r\nI'm not actually sure we should do this myself. Perhaps discuss it with the other members. But there's a clear advantage of doing that. It is more the reverse reasoning:  I want to avoid that object factory methods are per-accident selected (been there myself). By having an annotation on this you avoid this problem. However.. you run into the same problem as you did: generated code. So: its all about making the user aware of what he's actually doing. We can also extend the functionality of plainObjectFactories methods (allow source parameters, `@Context` annotated parameters) since we now now their only purpose has become: objectFactory.\r\n\r\n@filiphr, @agudian, @gunnarmorling : what you guys think?"}}
{"actor":{"display_login":"sjaakd"}}