Good day, everyone!!! Thank you very much, very needed information
@Quester822 жыл бұрын
Is there an out of the box way to create such a projection with nested fields like, for example, List 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?
@TimoSurfs3 жыл бұрын
Incredibly helpful video!
@MrMikomi3 жыл бұрын
Hi, how can we verify that Dto projections are more performative than eg entity projections? Thanks.
@ajayuyyala3383 жыл бұрын
Much needed information. Do they support nested DTO projection? Like objects with collection objects.
@Thorben-Janssen3 жыл бұрын
Hi Ajay, No, there is no support for nested DTO projections. You could add a constructor to your top-level class and instantiate the nested DTO objects in there. But please keep in mind that Hibernate applies the constructor to each record in the result set as the database returns it. This result set is a flat data structure. You can't access the full list of a to-many association in the constructor because the database returns it as author1-book1, author1-book2, author1-book3, ...
@ajayuyyala3383 жыл бұрын
@@Thorben-Janssen thank you for the reply. Yes the result set is a flat data structure. My response format is a bit complex. I used the constructor to create a temporary response and converted it to my desired response format using mapstruct. Your blog has been very much useful. Thank you!
@rahulkhimasia3 жыл бұрын
Very informative. Thanks.
@shubhamchauduary44922 жыл бұрын
@ThorbenJanssen How to use the nested DTO data Projection
@robertzdeb81033 жыл бұрын
Great stuff!
@ganeshvbidwe3 жыл бұрын
Hello Thorben Janssen, Please provide the entire source code