JPA/Hibernate Fundamentals 2023 - Lesson 12 - Native queries

preview_player
Показать описание

In this stream, we discuss the JPA specification and learn to implement the persistence layer of a Java app using a JPA implementation such as Hibernate.
Рекомендации по теме
Комментарии
Автор

Thanks for your efforts.. this is very informative

jagdishtawde
Автор

Hi Laurentiu, I would like to go back to the question you are answering at about 10:00. I think it is true, that fields annotated with @Basic are always fetched eagerly, even if we set fetch strategy as LAZY for such field. I checked in Hibernate documentation and did some tests, and the only possibility to enforce LAZY loading on @Basic annotated values is to use bytecode enhancement using maven plugin. Official docs (p.3.2.1) says: "Jakarta Persistence requires providers to support EAGER, while support for LAZY is optional meaning that a provider is free to not support it. Hibernate supports lazy loading of basic values as long as you are using its bytecode enhancement support."

jarekjal
Автор

Man when will you finish this playlist, great lessons

mahmoudgamal
Автор

Can you explain what's the difference between:

@Inject
EntityManager em;

and (with the EntityManagerFactory)

EntityManager em = emf.createEntityManager();

minimiflow
Автор

With stored procedure, if you manipulate data, it is outside the JPA context, and won't be in sync?

arandaid
Автор

Hi Laur
Huge fan of your content here. Appreciate all the hard work you put in your videos. I just have one request. Throught my experience, I have met quite a lot of java devs, however it seems to me that no one fully understands how transactions are managed by spring, which is not a surprise. There are layers upon layers of tech stack. First is db transaction management, then comes jdbc layer, then hibernate, then jpa and on top of that spring boot with its annotation shortcuts. So it is really hard from this high level to see how transactions work under the hood. It would be awesome, if you could compare those layers and discuss all the possible cases and how they look in all four stacks. What is difference between session and transaction and so on. More advanced details then just JPA repositories. If you don’t have time, maybe you can suggest some books or resources which dives deep into these topics. Thanks in advance.

herculesizevsisshvili
Автор

Are you going to discuss how to deal with enums ?
and we want a marathon day for hibernate if you don't mind.
and thank you so much for these
gorgeous lessons

mohammedhegazy
Автор

hello sir,
How many lesson's are remaining in this series?
And thank you for teaching us!

thegajjo
Автор

Views are okay, but won't work for DELETE and UPDATE queries where you need native functionality.

arandaid