Have the possibility to not only define the entity but also a separate DTO for it. For a DB entry you could then have an entity definition (persistence layer) as is written into the database as well as a DTO (presentation layer). Mapping is feasible with Mapstruct, either by trying to generate it or by having the user provide it according to a given format beside the JDL file.
Motivation for or Use Case
In most applications I am aware of the persistence layer is always slightly different than what is presented in the frontend/REST api. To account for that you currently have to adapt the generated code. But technically it seems pretty straight-forward to support and would make the generated functionality more powerful and cover - in my experience - a very common issue that presentation layer != persistence layer.
Related issues or PR
No related issues
[ x] Checking this box is mandatory (this is just to show you read everything)
Overview of the feature request
Have the possibility to not only define the entity but also a separate DTO for it. For a DB entry you could then have an entity definition (persistence layer) as is written into the database as well as a DTO (presentation layer). Mapping is feasible with Mapstruct, either by trying to generate it or by having the user provide it according to a given format beside the JDL file.
Motivation for or Use Case
In most applications I am aware of the persistence layer is always slightly different than what is presented in the frontend/REST api. To account for that you currently have to adapt the generated code. But technically it seems pretty straight-forward to support and would make the generated functionality more powerful and cover - in my experience - a very common issue that presentation layer != persistence layer.
Related issues or PR
No related issues