Also, it would be nice to have support for mapping to DTOs using annotations (not the entities themselves)... maybe that's an opportunity to rethink EntityStore for this too...
t
Toshihiro Nakamura
01/03/2023, 11:01 PM
Why not just map entities to DTOs using programming code instead of annotations?
d
dave08
01/04/2023, 12:05 PM
I guess if they're used only once you'd be right... but if it would be used many times, remapping could get to be error-prone. Especially, since most of the time, it's easy to deduce the correspondence between the fields in the entity and the DTO even w/o specially annotating the DTO...
dave08
01/04/2023, 12:06 PM
And refactoring would make a compile-time error, whereas programmatical mapping would only fail at run time.
t
Toshihiro Nakamura
01/04/2023, 12:24 PM
but if it would be used many times, remapping could get to be error-prone.
Why not make the mapping code common?
programmatical mapping would only fail at run time.