Questions tagged [dto]
DTO is an acronym for Data Transfer Object, a design pattern used in data transfer.
2,149
questions
0
votes
0
answers
24
views
Managing Dynamic Forms with 900+ Services in a Laravel Application [closed]
I'm working on a Laravel project where each service has a dynamic form layout configured through a backend admin panel. The project has the potential to grow to over 900 services, with each service ...
-1
votes
0
answers
21
views
Need to extract a method to use in equals implementation with Hibernate DTO's
I am updating a Java project and had to add an equals() implementation 3 java DTO files (call them Child1, Child2 and Child3) which all extend the DTO Parent class. IntelliJ generated the following ...
0
votes
0
answers
18
views
Unserialize a Vue 3 Computed property
Is there a way to unserialize a computed property in Vue 3?
I have the class below:
export default class Task {
id: undefined
pn: null
quantity: null
operation: null
unit: null
...
0
votes
1
answer
25
views
API Platform custom Controller serialization problem
I have a very simple custom API endpoint with an input and output DTO and a Symfony Controller, build like the examples in the documentation page: https://api-platform.com/docs/v2.3/core/dto/
#[...
1
vote
1
answer
33
views
Multikind Object validation in Nestjs DTO
I have code something like below. But I found out that @ValidateNested doesn't support when we do "TwoWheel | FourWheel" like this. Also I have no way of determining if incoming payload ...
0
votes
0
answers
55
views
How to define optional properties in Data Transfer Objects?
Below is my Data Transfer Object using Spatie\LaravelData\Data using Laravel Framework 9.52.16. In this definition $user_id is defined as optional property but yet when it is missing it throws an ...
0
votes
0
answers
45
views
Repeating validations on DTO's
I have recently started learning Asp.net core. I came across DTO's concept. I am using Attributes for validation. I have read online that validation on DTO's is considered common/good practice on ...
0
votes
1
answer
47
views
Problem with attribute names in persistence with JPA
I'm having a problem trying to map database columns to DTO with JPA in my backend.
Some column names are not accepted, I don't know why. This began to occur after the use of quarkus.
When I set the ...
0
votes
0
answers
18
views
SonarQube - Code Coverage Issue but Unit-Test class is already implemented
I'm having an issue on SonarQube regarding code coverage.
This is the method don't covered for SonarQube:
but this is my unit-test class implemented:
package com.hitachirail.maas.acingestion.dto....
1
vote
1
answer
144
views
DTO on hexagonal architecture and DDD
I've a spring application (webservice that connect to a database and retrieve data) using a hexagonal architecture and DDD (Domain-Driven Design).
The basic struture is
Application
Controller to ...
0
votes
0
answers
43
views
Handle the trimming in NestJS using Typescript (DTO files)
Below is the create-user-dto file where I have used to create the creation of an account including a username, password and a role. Done using arrays. Although I have set it up still it shows' white ...
0
votes
1
answer
52
views
Parameters in @Query Annotation for DTO Class Spring Boot 3
I want to use this following DTO-Class to project the Entity-Object in my project in the purpose to retrieve the corresponding information related to my profile depending on id's value given as ...
0
votes
0
answers
44
views
How to send a dictionary in post request in Nestjs when whitelist is set to true?
I'm trying to send a dictionary that maps a string key to an object. When whitelist is set to false I can get the data no problem, but when it is set to true I keep getting an empty body in NestJs. ...
0
votes
0
answers
36
views
is it good practice to compute booleans inside dto?
Here is my code, where the !!name && !!familyRole && !!gender part is computing isOnboarded value. Is it good practice to do such calculations inside DTO class ?
import { UserDocument }...
0
votes
0
answers
112
views
Mapping Tuple from Native Query Result to DTO in Spring Data JPA
I'm trying to map the results of a native SQL query executed through Spring Data JPA to a Data Transfer Object (DTO) class. The query retrieves data from two related tables: Data and Address.
Here are ...