JPA & Hibernate - Why, When & How to use DTO Projections

preview_player
Показать описание
DTOs are easy to use and the most efficient projection for read-only operations. So, whenever you don’t need to change the requested information, you should prefer a DTO projection.
But what exactly is a DTO? How does such a projection work with Hibernate? And how can you use it in your queries?
I will answer all of these questions in this video. And I will even show you a way to use a DTO projection that doesn’t require a custom DTO class.

Like my channel? Subscribe!

Join the free Member Library:

Result Set Mapping: The Basics -

Result Set Mapping: Complex Mappings -

Result Set Mapping: Constructor Result Mappings -

Result Set Mapping: Hibernate Specific Mappings -

Want to connect with me?

#DTO #Projection #JPA #Hibernate
Рекомендации по теме
Комментарии
Автор

Good day, everyone!!! Thank you very much, very needed information

Serhiy-Nechosov
Автор

Is there an out of the box way to create such a projection with nested fields like, for example, List<Item> items; ?
And if here is no way to do that what do you suggest to do when you actually need to build such a projection?

Quester
Автор

Hi, how can we verify that Dto projections are more performative than eg entity projections? Thanks.

MrMikomi
Автор

@ThorbenJanssen How to use the nested DTO data Projection

shubhamchauduary
Автор

Much needed information. Do they support nested DTO projection? Like objects with collection objects.

ajayuyyala
Автор

Hello Thorben Janssen,
Please provide the entire source code

ganeshvbidwe