How to Return DTOs from Native Queries with Spring Data JPA

  Рет қаралды 36,659

Thorben Janssen

Thorben Janssen

Күн бұрын

Пікірлер
@rohanbipetkar3800
@rohanbipetkar3800 2 жыл бұрын
I was getting this ConverterNotFoundException, searched alot about this but didn't find anything specific. Found this video which is extremely helpful
@haoxu3515
@haoxu3515 2 жыл бұрын
This tutorial is super concise and accurate. It accurately answered the questions most likely to be asked by fresh learners like me..
@andreafranceschini2400
@andreafranceschini2400 2 жыл бұрын
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. 👍
@andreafranceschini2400
@andreafranceschini2400 2 жыл бұрын
and yes, I subscribed to the channel 🙂
@kennedmena4121
@kennedmena4121 2 жыл бұрын
wao I did save a lot of time just doing the first scenario, making an interface for getting the data. thanks a lot
@ModifiedGaddiyan
@ModifiedGaddiyan 5 ай бұрын
tell me when query gives you list of names then how to get that list?
@srikanthkadiyala5971
@srikanthkadiyala5971 5 ай бұрын
Good Morning, I have a scenario to fetch the data from teradata sql views by using spring-boot-data-jpa with no primary key column in database. 1. When using entity it is expecting primary key but we don't have the PK ID column in database. Existing behaviour of data mapping: They joined multiple views and getting the data and mapping DTO class by using RowMapper with spring-boot < 3.x Expected: After >3.x spring-boot version upgrade data binding is not happening. If you have any idea that would be great helpful to me?? Thanks Note:I have done the all the code change related to JPA but getting the Exception like ID column not found in database because as mentioned don't have Id column in views..
@kushalyeluri5793
@kushalyeluri5793 Жыл бұрын
If I use namednativequery with custom DTO using sqlresultsetmapping. Is it possible to perform pagination for that?
@KrishnaKishore
@KrishnaKishore 3 жыл бұрын
@Thorben Can I export these Repos as a Jar and use them in different projects?
@urrahman196
@urrahman196 3 жыл бұрын
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
@ekaterinagalkina7303
@ekaterinagalkina7303 3 жыл бұрын
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)?
@TrinhNguyen-lf6zp
@TrinhNguyen-lf6zp 2 жыл бұрын
sorry, i fail with field id data type bigint sqlserver -> data type java Long. Exception: Could not locate appropriate constructor on class: xxxDto
@yousufbaig821
@yousufbaig821 2 жыл бұрын
Superb video !! Thanks a lot. This helped me a lot.
@anjanx44
@anjanx44 Жыл бұрын
Thanks man you save my lots of time ❤
@Denys.Stoianov
@Denys.Stoianov 3 жыл бұрын
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 Жыл бұрын
kkk, mais uma vez precisei assistir esse vídeo.
@profebuka
@profebuka 3 жыл бұрын
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.
@danykoudja168
@danykoudja168 3 жыл бұрын
Unfortunately, the entire entity graph of your entity class is loaded before you map it to your dto. With the approach presented, the projection on the fields you need in your dto are directly made during the SQL query. So your query becomes faster.
@nitinsoni3358
@nitinsoni3358 5 ай бұрын
Good work, thanks
@yyyyyyyyyyy1988
@yyyyyyyyyyy1988 2 жыл бұрын
Thanks alot sir, you saved my day
@niiel98
@niiel98 2 жыл бұрын
YOU ARE AMAZING!!!!! THANKS!!!!!
@menssageiro01
@menssageiro01 3 жыл бұрын
Muito Obrigado pela aula.
@abhisheksuryawanshi9102
@abhisheksuryawanshi9102 2 жыл бұрын
GOD LEVEL TOUTORIAL
@paolofrancescosciammarella1420
@paolofrancescosciammarella1420 2 жыл бұрын
Amazing! Thank u so much!
@azizbekibnhamid642
@azizbekibnhamid642 Жыл бұрын
Thank you very much
@bareetsingh
@bareetsingh 3 жыл бұрын
Thank you, so much sir.
@yamincires5313
@yamincires5313 3 жыл бұрын
I love your content :)
@Thorben-Janssen
@Thorben-Janssen 3 жыл бұрын
Thank you.
@marcelbartholome5629
@marcelbartholome5629 3 жыл бұрын
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!
@GddbHdhd-gb4wl
@GddbHdhd-gb4wl 2 ай бұрын
Martin Brenda Moore Sandra Young Steven
@ShinAkuma
@ShinAkuma 2 жыл бұрын
That's too much code. Just use " select new MyPojo( a.col1, a.col2... ) from Table a"
How to call native SQL queries with JPA and Hibernate
13:46
Thorben Janssen
Рет қаралды 4,7 М.
JAVA DTO Pattern Tutorial | Simplify Your Code
19:12
Amigoscode
Рет қаралды 217 М.
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
JPA & Hibernate - Why, When & How to use DTO Projections
10:38
Thorben Janssen
Рет қаралды 16 М.
Spring & Spring Data JPA: Managing Transactions
10:34
Thorben Janssen
Рет қаралды 66 М.
Spring Data JPA: Ultimate Guide to Custom Queries with @Query Annotation
15:09
5 Hibernate Features You Should Use With Spring Data JPA
11:21
Thorben Janssen
Рет қаралды 5 М.
Spring Data JPA -Criteria Queries - The Full Guide
30:07
Bouali Ali
Рет қаралды 46 М.
JPA & Hibernate: Basic Annotations You Need To Know
15:11
Thorben Janssen
Рет қаралды 32 М.
Spring Boot + Spring Security + JWT from scratch - Java Brains
39:29
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН