How to Return DTOs from Native Queries with Spring Data JPA

How to Return DTOs from Native Queries with Spring Data JPA

Thorben Janssen

2 года назад

33,000 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@azizbekibnhamid642
@azizbekibnhamid642 - 19.08.2023 18:26

Thank you very much

Ответить
@anjanx44
@anjanx44 - 13.08.2023 22:36

Thanks man you save my lots of time ❤

Ответить
@kushalyeluri5793
@kushalyeluri5793 - 13.07.2023 13:48

If I use namednativequery with custom DTO using sqlresultsetmapping. Is it possible to perform pagination for that?

Ответить
@ASSASIN299
@ASSASIN299 - 22.06.2023 13:02

Thanks my friend, just what I needed

Ответить
@menssageiro01
@menssageiro01 - 11.03.2023 22:54

kkk, mais uma vez precisei assistir esse vídeo.

Ответить
@niiel98
@niiel98 - 11.12.2022 18:10

YOU ARE AMAZING!!!!! THANKS!!!!!

Ответить
@rohanbipetkar3800
@rohanbipetkar3800 - 04.09.2022 13:35

I was getting this ConverterNotFoundException, searched alot about this but didn't find anything specific. Found this video which is extremely helpful

Ответить
@yousufbaig821
@yousufbaig821 - 26.08.2022 23:04

Superb video !! Thanks a lot. This helped me a lot.

Ответить
@andreafranceschini2400
@andreafranceschini2400 - 28.06.2022 15:58

A good tutorial that makes things clear and simple. It helped me to solve a problem. One thing: in the repository definition of the query I had to use (@Param("id") Long id) instead of (Long id) to make it work. 👍

Ответить
@kennedmena4121
@kennedmena4121 - 12.06.2022 03:44

wao I did save a lot of time just doing the first scenario, making an interface for getting the data.
thanks a lot

Ответить
@TrinhNguyen-lf6zp
@TrinhNguyen-lf6zp - 11.06.2022 20:37

sorry, i fail with field id data type bigint sqlserver -> data type java Long. Exception: Could not locate appropriate constructor on class: xxxDto

Ответить
@abhisheksuryawanshi9102
@abhisheksuryawanshi9102 - 09.06.2022 12:54

GOD LEVEL TOUTORIAL

Ответить
@haoxu3515
@haoxu3515 - 22.04.2022 12:01

This tutorial is super concise and accurate. It accurately answered the questions most likely to be asked by fresh learners like me..

Ответить
@ShinAkuma
@ShinAkuma - 18.04.2022 09:18

That's too much code.
Just use " select new MyPojo( a.col1, a.col2... ) from Table a"

Ответить
@paolofrancescosciammarella1420
@paolofrancescosciammarella1420 - 27.03.2022 21:37

Amazing! Thank u so much!

Ответить
@yyyyyyyyyyy1988
@yyyyyyyyyyy1988 - 21.02.2022 12:59

Thanks alot sir, you saved my day

Ответить
@bareetsingh
@bareetsingh - 04.01.2022 20:53

Thank you, so much sir.

Ответить
@urrahman196
@urrahman196 - 01.11.2021 19:02

Hello, Can you please make a tuto or blog on - how to do the scalar projection? Got few lines in tour blog but not details implementation, I am talking about the object[ ] way to implement DTO

Ответить
@KrishnaKishore
@KrishnaKishore - 03.10.2021 15:30

@Thorben Can I export these Repos as a Jar and use them in different projects?

Ответить
@ekaterinagalkina7303
@ekaterinagalkina7303 - 19.09.2021 00:57

p.first_name as firstName. But what would be the alias for a nested object? For example, address.street as {what?} (assuming that PlayerName references Address)?

Ответить
@Denys.Stoianov
@Denys.Stoianov - 12.09.2021 12:54

This is the good things, but I didn't get how it works, I need to try it in ide. Maybe in next video if is possible to show how it works in IDE with real coding for better understanding 🤔

Ответить
@menssageiro01
@menssageiro01 - 12.09.2021 00:58

Muito Obrigado pela aula.

Ответить
@profebuka
@profebuka - 10.09.2021 18:54

Good content but it's complex. JPA can execute with native query to return the entity class. Then I can map the enity class to the dto.

Ответить
@yamincires5313
@yamincires5313 - 09.09.2021 16:01

I love your content :)

Ответить
@marcelbartholome5629
@marcelbartholome5629 - 09.09.2021 15:10

Hi, Thorben, ich mag deine Videos sehr und habe normal auch kein Problem, diese in englischer Sprache zu hören, aber manchmal wäre es auch cool sie zusätzlich in deutsch anschauen zu können. vll. denkst du mal darüber nach auch deutsche Untertitel einzubauen. Mach Weiter so!

Ответить