while fetching data from the database sometimes we get recursive data with a stack overflow error, so which is the best way to solve it @jsonIgnore or @jsonBackReferecnce? everyone encounters this once while working with hibernate so what's your answer for this sir?
So when you say use Graph or join fetch clause you mean not using the regular find methods of the entity manager and executing the query within the same session ?? Also, One day I fixed the exception using the @Transactional annotation. Does that mean, I opened the session again to load the lazy field ? Please let me know what your thoughts are. thanks
while fetching data from the database sometimes we get recursive data with a stack overflow error, so which is the best way to solve it @jsonIgnore or @jsonBackReferecnce? everyone encounters this once while working with hibernate so what's your answer for this sir?
You asked what I was thinking man. The other day even I fixed the issue by marking the method as @Transactional of spring framework. I think that opened the session again for the code we wrote in the method. But my technical manager accepted the solution. I hope he replies to this.
8k views only. This video contains at least two interview questions.
Thank you for everything Thorben.
Thanks! Need deep explanation JPA Graph Entity with example!
thanks for helping me because I face LazyInitializationException many times but didn't able to understand which solution is a batter choice.
I am glad this helped.
while fetching data from the database sometimes we get recursive data with a stack overflow error, so which is the best way to solve it @jsonIgnore or @jsonBackReferecnce?
everyone encounters this once while working with hibernate so what's your answer for this sir?
like always very nice video.
So when you say use Graph or join fetch clause you mean not using the regular find methods of the entity manager and executing the query within the same session ??
Also, One day I fixed the exception using the @Transactional annotation. Does that mean, I opened the session again to load the lazy field ?
Please let me know what your thoughts are. thanks
Is JPA 2.1 Supports JRE 7
while fetching data from the database sometimes we get recursive data with a stack overflow error, so which is the best way to solve it @jsonIgnore or @jsonBackReferecnce?
everyone encounters this once while working with hibernate so what's your answer for this sir?
Never got
If we declare entire method with @Trasactional then will not get this exception. This way is correct or not?
You asked what I was thinking man. The other day even I fixed the issue by marking the method as @Transactional of spring framework.
I think that opened the session again for the code we wrote in the method.
But my technical manager accepted the solution. I hope he replies to this.
I don't use @Transactional, I think you should use FTP instead
Should we use @JsonIgnoreProperties({"hibernateLazyInitializer", "handler"}) on the class causing this error?
This seems to fix the issue.