Тёмный

Part 11 - Solving Infinite Recursion using @JsonManagedReference and @JsonBackReference 

Kindson The Tech Pro
Подписаться 56 тыс.
Просмотров 12 тыс.
50% 1

Step by Step here: www.kindsonthegenius.com/hibe...
Part 1 - Introduction to Hibernate for Java Programmers
Part 2 - Setting Up • Part 2 - Setting Up S...
Part 3 - @ManyToOne Mapping • Part 3 - @ManyToOne M...
Part 4 - Configure H2 In-Memory Database • Part 4 - Configure the...
Part 5 - Database Initialization(data.sql) • Part 5 - Database Init...
Part 6 - @OneToMany Mapping • Part 6 - @OneToMany Re...
Part 7 - mappedBy Attribute of @OneToMany • Part 7 - The mappedBy ...
Part 8 - @JoinColumn Annotation • Part 8 - @JoinColumn A...
Part 9 - findAll() and findById() • Part 9 - Setup findAll...
Part 10 - Infinite Recursion(Stackoverflow Error) • Part 10 - Infinite Rec...
Part 11 - Solving Infinite Recursion (@JsonManagedReference and @JsonBackReference) • Part 11 - Solving Inf...
Part 12 - @JsonIdentityInfo and @JsonIgnore • Part 12 - @JsonIdentif...
Part 13 - Get List of Users by Location • Part 13 - Get List of ...
Part 14 - Get List of Posts by User • Part 14 - Get List of ...
Part 15 - UsersByLocation by Extending JPARepository • Part 15 - List of User...
Part 16 - PostsByUser by Extending JPARepository • Part 16 - Get List of ...
Part 17 - Setup Advanced REST Client • Part 17 - Setup Advanc...
Part 18 - Insert New Location • Part 18 - Add New Loca...
Part 19 - Insert New User • Part 19 - Inserting a ...
Part 20 - Insert New Post • Part 20 - Inserting a ...
Part 21 - Update Location • Part 21 - Updating Loc...
Part 22 - Update User • Part 22 - Updating Use...
Part 23 - Update Post • Part 23 - Updating Pos...
Part 24 - Delete Method for Post • Part 24 - Deleting a Post
Part 25 - Delete Method for User • Part 25 - Deleting a User
Part 26 - CascadeTypes in Hibernate • Part 26 - CascadeType ...
Part 27 - Delete Method for Location • Part 27 - Deleting a L...
Part 28 - FetchTypes in Hibernate • Part 28 - FetchType in...
Subscribe Kindson The Tech Pro RU-vid: bit.ly/2PpJd8Q
Join my group ICS on Facebook: bit.ly/2UULiQj
Follow me on Instagram - / kindsonm
Connect with me on LinkedIn: / kindson
Follow me on Twitter: / kindsonm
Learn about me: www.kindsonthegenius.com

Наука

Опубликовано:

 

2 сен 2019

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 64   
@kirkandy111
@kirkandy111 2 года назад
You rock Kindson! I was going crazy for the past two days! 😃 Thank you and looking forward to more such videos!
@KindsonTheTechPro
@KindsonTheTechPro 2 года назад
You're so welcome!
@dexterthemsb
@dexterthemsb 3 года назад
Love your tutorials dude. The way of explaining is amazing and calm.
@iabeteetmechante
@iabeteetmechante 3 года назад
You explains things very well Kingston, thanks a lot for all your videos
@veljkoradunovic5449
@veljkoradunovic5449 3 года назад
Perfect explanation! Thank you very much, you've saved my day!!!!!!
@ascar66
@ascar66 2 года назад
Used to face this type of recursion problem, I didn't know about this solution. Thank you
@arthurezeagbo3986
@arthurezeagbo3986 3 года назад
Thank you Kindson. I like how you simplify some of these concepts.
@KindsonTheTechPro
@KindsonTheTechPro 3 года назад
You're so welcome! And do remember to subscribe 😃
@pXiusZA
@pXiusZA 3 года назад
Thank you so much! Awesome explanation.
@adriansantos9086
@adriansantos9086 4 года назад
Thanks a lot, this worked perfectly.
@AshutoshMohanty07
@AshutoshMohanty07 4 года назад
Thanks! You just saved a day in my job!
@LuanDR
@LuanDR 3 года назад
Thanks my friend!
@aibeknazaraliev7000
@aibeknazaraliev7000 7 месяцев назад
So much help man !!!!!
@wis6897
@wis6897 2 года назад
best solution thanks!!
@ferlowcazer
@ferlowcazer 3 года назад
Thank you!
@cfv717
@cfv717 4 года назад
nice one
@JorgeQuiguango
@JorgeQuiguango 3 года назад
Thanks very very much!!!!!
@DALIProductions
@DALIProductions 3 года назад
Thank you so much!!!
@muhmagdy
@muhmagdy Год назад
Thank you
@MathisPct
@MathisPct 2 года назад
@JsonManagedReference is the forward part of reference - the one that gets serialized normally. @JsonBackReference is the back part of reference - it will be omitted from serialization.
@KindsonTheTechPro
@KindsonTheTechPro 2 года назад
Thanks for the clarification 😊
@annuskitchen4584
@annuskitchen4584 4 года назад
I updated the version pf Jackson core and after dat stackoverflow error arised.is dere any relation with these two??
@islamicscholar5782
@islamicscholar5782 2 года назад
Thank you soo much
@KindsonTheTechPro
@KindsonTheTechPro 2 года назад
Welcome 😊
@kensinaon
@kensinaon 4 года назад
When I go to "/users" the location is not showing?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@lieutneautnacer
@lieutneautnacer 2 года назад
Thanks a lot.the proleme here is how to use thoes annotations on getter while using lombock
@kvnagendra5354
@kvnagendra5354 2 года назад
If anyone knows plz tell me.. Why location details didn't came at here when acces user
@sohelshaikh-px1ii
@sohelshaikh-px1ii 3 года назад
Thanks...
@kresji6873
@kresji6873 2 года назад
You're the savior ❤❤❤❤❤❤❤❤❤❤❤❤ Whatever ppl say, you're the best, im subscribing you
@KindsonTheTechPro
@KindsonTheTechPro 2 года назад
I'm so glad 😊
@pablosuarezcabal2986
@pablosuarezcabal2986 4 года назад
And what happend if we have a controller, to get all the Post? it will include the user inside de Post object?
@AntonioMartinez-mt6me
@AntonioMartinez-mt6me 4 года назад
x2
@mustaphaab7127
@mustaphaab7127 3 года назад
Hi from morocco thanks a lot. I have a question. How can i use those annotations @jsonmanagedreference and @... if i use lombok data therefore i dont have getters and setters Thank you again
@cinemaismywife
@cinemaismywife 3 года назад
Did you get an answer for this? I am also having same problem
@mustaphaab7127
@mustaphaab7127 3 года назад
@@cinemaismywife i didnt get any answer. If you get one let me know pleaz
@rf3123
@rf3123 3 года назад
Put the annotations @JsonManagedReference and @ JsonBackReference above the variable and not the getter/setter.
@cinemaismywife
@cinemaismywife 3 года назад
But what if we are using lombok(@Getter and @Setter) for the entities?
@gsdevman7781
@gsdevman7781 3 года назад
have you found a solution for your problem.?
@cinemaismywife
@cinemaismywife 3 года назад
@@gsdevman7781 Yes, you just need to do as the video says, even though we declare lombok. We can just generate the getter method and use the annotation on that. That the solution.
@gsdevman7781
@gsdevman7781 3 года назад
@@cinemaismywife thanks i will try it
@blueb00d74
@blueb00d74 4 года назад
It solves the recursion but I have faced another problem, when i try to insert new data. In my case, I have items and suppliers. Items and supplieres have a @manytomany relationship, I did exactly the same as you and Ii can get the Json perfectly, but when I try to insert a new item I have a deserialization problem. The message which I got is: 2019-11-16 16:48:00.072 WARN 824 --- [nio-8180-exec-2] .c.j.MappingJackson2HttpMessageConverter : Failed to evaluate Jackson deserialization for type [[simple type, class com.company.api.model.Item]]: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot handle managed/back reference 'defaultReference': back reference type (java.util.List) not compatible with managed type (com.ikea.api.model.Item)
@KindsonTheTechPro
@KindsonTheTechPro 4 года назад
You need to cross-check your code. However, alternatively, you can try the JsonIdentityInfo() annotation to see if the problem is solved.
@sanjeewanayanananda9657
@sanjeewanayanananda9657 4 года назад
If you have more than one @JsonBackReference annotation in your model, then you need to specify a value for that explicitly. check this link here if you are still having the problem. stackoverflow.com/questions/20119142/jackson-multiple-back-reference-properties-with-name-defaultreference
@Gorky25
@Gorky25 3 года назад
How does this infitive loop happen? That is mean every time when we have OneToMany and ManyToOne relationship we have to have @JsonManageReference and @JsonBackReference ?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
@manidixit6713
@manidixit6713 3 года назад
At 6:07..location is not there in the output. Can anyone explain?
Далее
Part 12 - @JsonIdentifyInfo and @JsonIgnore
3:06
Просмотров 3,4 тыс.
МАРИЯ ГОЛУБКИНА О БАБУШКЕ #shorts
00:43
Beautiful sport😍
00:20
Просмотров 201 тыс.
БАССЕЙНЫ ПО ЦВЕТАМ ЧЕЛЛЕНДЖ !
38:20
Generics: The most intimidating TypeScript feature
18:19
Spring | Autowire | Dependency Injection | Spring Boot
18:23
Grouping in mongodb
24:51
Просмотров 24 тыс.
How do indexes make databases read faster?
23:25
Просмотров 55 тыс.
JAVA DTO Pattern Tutorial | Simplify Your Code
19:12
Просмотров 195 тыс.
Part 8 - @JoinColumn Annotation
5:10
Просмотров 10 тыс.
Choose a phone for your mom
0:20
Просмотров 7 млн
Самый быстрый пылесос!
0:30
Просмотров 23 тыс.