Hashir-Jamil / LongBox

MIT License
1 stars 1 forks source link

[BR11] UserDto & User Entity Mapping Too Complex #11

Closed Hashir-Jamil closed 7 months ago

Hashir-Jamil commented 7 months ago

In the org.longbox.domainobjects.dto.UserDto org.longbox.domainobjects.entity.User classes the mapping between dto and entity should not be done using constructors. It should be done using the mapping classes. Dto and entity are Java Beans and should only have NoArgsConstructors.

The suggested fix is to remove all overloaded constructors for both the UserDto and User entity classes. Only use setter methods and mapping classes to map between these two objects.

ahan10 commented 7 months ago

Removed all constructors from UserDto and User entity classes, replaced all its occurrences with Java Beans. https://github.com/Hashir-Jamil/LongBox/commit/2a3f7263f023f8d861c15f852d3e961c347fc978