Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace nested DTOs with Long field for id usage in JSON body #22644

Closed
1 task done
hienhoang272 opened this issue Jun 22, 2023 · 1 comment
Closed
1 task done

Replace nested DTOs with Long field for id usage in JSON body #22644

hienhoang272 opened this issue Jun 22, 2023 · 1 comment

Comments

@hienhoang272
Copy link

hienhoang272 commented Jun 22, 2023

Overview of the feature request
Motivation for or Use Case

I noticed that all DTO classes are nested inside another DTO class, for example, FileDTO contains FolderDTO, but only the id field of FolderDTO is used in both request and response. Therefore, I suggest replacing all FolderDTO occurrences with a Long folderId field to make the JSON body in requests and responses more concise and easier to read, especially when DTO classes have many nested fields.

Related issues or PR

Using Long folderId instead of FolderDTO folder will simplify the JSON body in requests and responses, making it easier to understand and debug. It will also reduce unnecessary data transfer and improve performance. Moreover, it will make DTO classes more flexible and easier to manage, as they will not be tightly coupled with other DTO classes.

I could not find any related issues or pull requests regarding this feature request.

  • Checking this box is mandatory (this is just to show you read everything)
@mshima
Copy link
Member

mshima commented Jun 22, 2023

This was JHipster v6 implementation.
Having dto api similar to non-dto makes overall implementation much simpler.

@mshima mshima closed this as completed Jun 22, 2023
@DanielFran DanielFran added this to the 8.0.0-beta.2 milestone Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants