Closed tranba closed 7 years ago
Why do you need to force the mapping in one direction? the purpose of JMapper is to allow to reuse the same configuration as much as possible
I'm using JPA - Hibernate and JMapper to map entities to dtos. I want to my entities has not need setter for id property. For now, my workaround is write a setter method for id property in abstract entity class with empty body 😄
public void setId(Long id) {
}
Thank you! (Sorry for my English)
why you don't exclude the field from mapping? However I am happy that you have solved.
Add a star if you like the project, thank you!
I need id field in DTOs but not want to update entity's id. I am happy with my workaround too. So I will close this issues.
I can't find out the way to mapping fields in one direction only. Can you add this feature? In Orika (https://orika-mapper.github.io/orika-docs/mappings-via-classmapbuilder.html) we can do like that:
mapperFactory.classMap(BasicPerson.class, BasicPersonDto.class).fieldAToB("name", "fullName") ... .register();