{"action":"opened","issue":{"url":"https://api.github.com/repos/mapstruct/mapstruct/issues/790","repository_url":"https://api.github.com/repos/mapstruct/mapstruct","labels_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/790/labels{/name}","comments_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/790/comments","events_url":"https://api.github.com/repos/mapstruct/mapstruct/issues/790/events","html_url":"https://github.com/mapstruct/mapstruct/issues/790","id":142956316,"number":790,"title":"Empty object if there is no @Mappings annotation ","user":{"login":"almothafar","id":13887564,"avatar_url":"https://avatars.githubusercontent.com/u/13887564?v=3","gravatar_id":"","url":"https://api.github.com/users/almothafar","html_url":"https://github.com/almothafar","followers_url":"https://api.github.com/users/almothafar/followers","following_url":"https://api.github.com/users/almothafar/following{/other_user}","gists_url":"https://api.github.com/users/almothafar/gists{/gist_id}","starred_url":"https://api.github.com/users/almothafar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/almothafar/subscriptions","organizations_url":"https://api.github.com/users/almothafar/orgs","repos_url":"https://api.github.com/users/almothafar/repos","events_url":"https://api.github.com/users/almothafar/events{/privacy}","received_events_url":"https://api.github.com/users/almothafar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-23T13:16:32Z","updated_at":"2016-03-23T13:16:32Z","closed_at":null,"body":"I have issue with empty object if I just was have mapper but without any `@Mappings` annotation, as the following example: \r\n\r\n```\r\n@Mapper\r\npublic interface UserMapper {\r\n    public static UserMapper INSTANCE = Mappers.getMapper(UserMapper.class);\r\n\r\n    User map(UserDTO userDTO);\r\n    UserDTO map(User user);\r\n}\r\n```\r\n\r\nClasses: \r\n\r\nUser:\r\n```\r\n@Entity\r\n@EntityConcurrencyMode(ConcurrencyMode.NONE)\r\n@Table(name = \"USERS\")\r\npublic class User extends BaseModel {\r\n\r\n    @Column(name = \"full_name\", nullable = false)\r\n    public String fullName;\r\n\r\n    @Column(nullable = false)\r\n    public String email;\r\n\r\n    public User() {\r\n    }\r\n\r\n}\r\n```\r\n\r\nUserDTO: \r\n```\r\npublic class UserDTO extends BaseDTO {\r\n\r\n    public String fullName;\r\n    public String email;\r\n\r\n}\r\n```\r\n\r\nSo simply the generated UserMapperImpl will be like this : \r\n```\r\n@Generated(\r\n    value = \"org.mapstruct.ap.MappingProcessor\",\r\n    date = \"2016-03-23T15:05:35+0200\",\r\n    comments = \"version: 1.1.0.Beta1, compiler: javac, environment: Java 1.8.0_66 (Oracle Corporation)\"\r\n)\r\npublic class UserMapperImpl implements UserMapper {\r\n\r\n    @Override\r\n    public User map(UserDTO userDTO) {\r\n        if ( userDTO == null ) {\r\n            return null;\r\n        }\r\n\r\n        User user = new User();\r\n\r\n\r\n        return user;\r\n    }\r\n\r\n    @Override\r\n    public UserDTO map(User user) {\r\n        if ( user == null ) {\r\n            return null;\r\n        }\r\n\r\n        UserDTO userDTO = new UserDTO();\r\n\r\n\r\n        return userDTO;\r\n    }\r\n}\r\n```\r\n\r\nTo get workaround this I just added one target and source: \r\n```\r\n@Mappings({\r\n            @Mapping(source=\"fullName\", target=\"fullName\"),\r\n    })\r\n```\r\n\r\nAnd Got correct generated implementation."}}