dto Questions
2
I currently have a fairly complex native SQL query which is used for reporting purposes. Given the amount of data it processes this is the only efficient way to handle it is with native SQL.
This ...
Mogador asked 21/1, 2016 at 17:43
3
Solved
I am trying to use AutoMapper to map my entity with my DTO, but when I try to use dependency injection in program.cs like this:
builder.Services.AddAutoMapper(typeof(UserRoleReMapperConfig));
I go...
Olodort asked 13/2, 2024 at 19:48
3
I am trying to validate an array of objects using DTO in nestjs. I have tried it but the data is not getting validated. I tried to search a lot but didn't get any answer.
These are my files:
trivia...
Bread asked 21/5, 2021 at 5:40
3
Solved
From query I get limit param.
How to transform into number and check by Dto ?
@Get('currency/:type')
getCurrency(
@Param() params: CurrencyTypeDto,
@Query('limit', ParseIntPipe) limit: number,
...
3
Solved
I'm creating an application facade in front of my domain model and using dto's for the exchanges between the consumer and the facade.
In order to avoid having to fully qualify my namespaces where ...
Charis asked 22/9, 2011 at 20:3
6
Solved
I feel like a combination of this thread and this thread is what I need to implement, I'm having trouble drawing them together.
I have a DTO that contains an enum.
Using Postman, I am sending a Pur...
7
Solved
I have these data transfer objects:
public class Report
{
public int Id { get; set; }
public int ProjectId { get; set; }
//and so on for many, many properties.
}
I don't want to write
publi...
3
Solved
I have a nodejs REST API backend running the nestjs framework, using typeORM as ORM for my entities.
Coming from a C#/Entity Framework background, I am very used to have my Dtos mapped to the data...
Edita asked 30/6, 2018 at 9:13
1
I have a project with a Nest.js API and an Angular SPA. The DTOs used by the SPA to communicate with the API are in a separate project called Models and I'm using it as a dependency. In that way, I...
Carditis asked 6/5, 2020 at 22:26
12
Solved
I've recently overheard people saying that data transfer objects (DTOs) are an anti-pattern.
Why? What are the alternatives?
Diplostemonous asked 17/9, 2009 at 19:46
2
Is there a way to map properties of Sort objects? Just a little example:
a Dto
public class OrderDto {
private long totalAmount;
private long openAmount;
}
and an entity
@Entity
public class Ord...
Enforcement asked 6/7, 2021 at 12:44
12
Solved
I am writing an MVC REST application with Spring Boot and Hibernate. I decided to do DTO mapping using MAPSTRUCT. It seems that I did everything according to the guide, but an error is issued. What...
Siouan asked 22/7, 2020 at 13:7
2
Here is the class of the object I am trying to map:
package com.agent.module.entities;
import java.util.Set;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.pe...
Ripsaw asked 13/5, 2018 at 18:49
9
Solved
Have seen some similar questions:
What is the difference between a JavaBean and a POJO?
What is the Difference Between POJO (Plain Old Java Object) and DTO (Data Transfer Object)?
Can you also ...
Singultus asked 23/10, 2009 at 9:30
5
Solved
We are creating rest api's with Spring Boot. We have three layers in our project(Repository, Service and Controller).
Lets say I have GetUser api in my controller that return UserDTO object.
@Get...
Sauls asked 14/12, 2017 at 22:17
3
Solved
I am using MapStruct to map between JPA entities and POJO DTOs.
All my entities extend a common base class that has an ID field (a java.lang.Long).
I have the following abstract mapper, that allo...
1
Solved
I want to make fields required based on another field in the DTO itself.
Currently my DTO looks like:
import { LOGIN_TYPE } from "src/utils/constants";
import { IsIn, IsNotEmpty, IsOption...
Erotomania asked 29/7, 2023 at 13:13
11
Solved
I've seen a lot of questions related to mapping DTOs to Domain Objects, but I didn't feel they answered my question. I've used many methods before and have my own opinions but I'm looking for somet...
Raillery asked 24/3, 2009 at 16:36
3
Solved
I'm using the built in NestJS ValidationPipe along with class-validator and class-transformer to validate and sanitize inbound JSON body payloads. One scenario I'm facing is a mixture of upper and ...
Swamy asked 29/12, 2020 at 3:24
1
We currently have over 100 DTOs already well-designed in a separate assembly and span multiple namespaces. How can we instruct the NSwag C# client generator to utilize our existing DTO library inst...
4
I'm converting my entity to DTO and I want to set NULL as DTO value for all fields, which are lazy-loaded and not initialized (because I do not want to transfer all the data all the time).
I've tr...
Haeres asked 8/4, 2013 at 23:4
9
Solved
I activated this feature in a project having data transfer object (DTO) classes, as given below:
public class Connection
{
public string ServiceUrl { get; set; }
public string? UserName { get; ...
Py asked 30/11, 2019 at 16:52
3
Solved
I'm working on the Spring boot JPA Gridle project. Current Swagger is running, and an error occurs while DTO is in progress. Modules seem to be colliding with each other.
An error occurs when I in...
Jackboot asked 16/3, 2020 at 16:33
2
Solved
I am facing a problem where my DTO types are named one thing, but I want them to appear with a different name in the OpenAPI doc page.
For example, I have a UserDto class that I use in my controlle...
1
Solved
I was introduced to Spatie\LaravelData when I was searching for how to implement DTOs in Laravel.
Using Data classes for insert/update for a single model is pretty straightforward. I tend to keep m...
Caritacaritas asked 6/2, 2023 at 9:26
1 Next >
© 2022 - 2025 — McMap. All rights reserved.