2,156 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
59
views
Symfony ObjectMapper fails on relational property
Everything works perfectly fine for flat structures. However I can't get the Author serialized in underneath API call on /api/books. They do describe Recursion over here: https://symfony.com/doc/...
Best practices
0
votes
1
replies
61
views
How should shared DTOs be managed across API, Application, and Frontend layers in a .NET 9 Clean Architecture project?
I’m working on a .NET 9 Clean Architecture solution with the following structure:
API – ASP.NET Core Web API (.NET 9)
Application – Application services and business logic
Domain – Core domain ...
0
votes
1
answer
243
views
What’s the most efficient way to map large entity models to DTOs in ASP.NET Core without using AutoMapper? [closed]
I'm working on a high-performance ASP.NET Core Web API where each request can return hundreds of entity records. Each entity includes multiple navigation properties and nested objects.
Currently, I’m ...
3
votes
1
answer
101
views
In Laravel’s Repository pattern, should I pass an Eloquent model (User $user) or a DTO to keep it framework-agnostic?
I’m refactoring my Laravel application to follow a clean architecture approach with clear separation of concerns:
Controller → Service → Repository
The Controller handles the HTTP layer,the Service ...
0
votes
1
answer
64
views
How to use different DTOs in the same @ModelAttribute between GET and POST in Spring MVC?
I'm working on a Spring Boot + Thymeleaf application where I have an edit page.
In my controller, I want to use different DTOs for the GET and POST methods:
ResponseDto for displaying data and ...
0
votes
0
answers
60
views
nestjs use i18n in decorators of class-validator without indicate one by one
I'm researching that can I use i18n for the messages of validation exceptions. For example:
create-user.dto.ts
export default class createUserDto {
@MinLength(5)
@IsString()
name: string;
}...
1
vote
1
answer
64
views
Exclude certain nested props in DTO with Jackson
Assuming I have these three DTO's
data class CountryDTO(
val name: String,
val isoAlpha3: String,
val subContinent: SubContinentDto,
val continent: ContinentDto
)
data class ...
1
vote
1
answer
34
views
FastifyAdapter bypasses global ValidationPipe for tz, resulting in 400 whitelistValidation error in production builds
FastifyAdapter bypasses global ValidationPipe for tz, resulting in 400 whitelistValidation error in production builds
Description
I’m experiencing an issue where my global ValidationPipe is correctly ...
0
votes
4
answers
262
views
Return DTO or Model? I have learned to return the DTO but in we return the model in the project I am currently working on
I'm a junior developer and started my first job as a developer and have a question regarding DTO and Model.
Consider this code snippet
@Override
public ResponseEntity<List<...
-1
votes
2
answers
64
views
Get property from nested object
I have this DTO:
import { Expose, Type } from 'class-transformer';
import { UserDto } from '../../../admin/users/dtos/user.dto';
export class CompanyDto {
constructor(partial: Partial<CompanyDto&...
0
votes
0
answers
97
views
Angular 19 returning partially correct DTOs from server eventhough all server data is correct
Return in controller shows "mostly" correct data but when returning it on client side is null.
I use Angular 19, .NET Core and EF Core. The mapping seems to be selective.
I create an Article ...
0
votes
1
answer
68
views
NestJS ValidationPipe with ValidateIf not preventing conditional field validation
I'm building an accounting application using NestJS. I have a DTO called CreateTransactionDto, and I want certain fields to be required or forbidden based on the value of transactionType. For example:
...
0
votes
1
answer
167
views
Entity Framework DBO to DTO Mapping causing Looping
I've been trying to get away from using AutoMapper, since everyone seems to think it's the devil. Because of this, I've been putting all of my mapping into the DBO and DTO models that I'm handing back ...
1
vote
1
answer
73
views
class-validator whitelisting properties of object inside array
I ́m trying to validate the body of a route on NestJS and i ́m using the class-validator package, my route is receiving the data as multipat because this route also accepts a file upload. Here is the ...
-4
votes
1
answer
79
views
Convert Map<String, Map<String, Object>> to class using mapstruct
I have an API response which looks like this
{
"apiResponse": {
"successRequestList": {
"rides": {
"bike": null,
"cars" :{
...