These fundamental lessons are exactly what I needed. I've starting software development lately and everything I'm using is highly abstracted, I admit I have no idea how most of my tools work. By knowing the fundamentals, I'm confident I can have much greater impact later in my career.
Hey there Laur. I'm pretty new to all this new java stuff like Spring, JPA, hibernate, etc. I used to work in AI/ML research but now I'm doing this. I just wanted to say that I absolutely love your teaching. It has seriously helped me understand all these crazy concepts. Thank you so much!
Hey Laur, I've been scouring the internet for resources on JPA/Hibernate, and I must say, your tutorial stands out as one of the most comprehensive ones I've come across. Kudos on creating such a valuable resource!
Thank you so much for creating such wonderful videos! Your content is truly inspiring and has brought me so much joy and knowledge. Keep up the fantastic work, and know that your efforts are deeply appreciated. Looking forward to more amazing videos from you. Thank you again 🤟
Hi Laur, Few Questions? 1. Are ORM frameworks used in Production Level Application? 2. If Yes, Can they be used with Large Scale Applications? 3. If Not, Why Learn them? 3.1 If Not, What is/are used in actual production Level Application? Looking forward to your answer.
Hello. Thanks for your questions. Here're my answers. 1. Yes, definitely 2. Yes, of course they are In fact, Hibernate and the JPA specification in general is one of the most encountered technologies in production apps in the Java world.
Hi Laur, I went through a course(a few years old course) starting that "session is to be used" in place of Entity which you are using, my question is "was there a change recently or can session still be used?". Thanks you for the educational videos, greatly appreciated.
Hey. Even when working with plain Hibernate today it's likely you'll prefer using EntityManager rather than Session today. But in the end, behind the scenes this only adapts the Session to the JPA specification.
Hello ! Thank you very much for this video, as always you explain things very well. A question if I may: When the persistence.xml file was being used to bootstrap the emf, what datasource was used ? The reason why I ask is because when using the CustomerPersistenceUnitInfo, you explicitly added and configured Hikari datasource which makes me wonder what datasource did the xml file approach used.
Hey. Good question. In that case you don't have too much flexibility. Depending on the implementation you use and its version it may be different types of data sources configured.
Thanks! I just have two silly questions.😅 -> what does the term "persistence" actually means when we talk about JPA because in different context it have different meanings? -> Are getters mandatory to be specified by a class annotated with @Entity?
Hi. Thanks for your questions. 1. In this case, persistence means persistently storing data in such a way in which you can later retrieve it. 2. While a JPA implementation can inject directly in the fields without needing to call setters and getters it's hard to believe you'll not need to access the data at some point later. So getters are not mandatory, but to get the values outside of the class, you'll most likely need them.
Hello. No, I didn't make any playlist on SQL. I only have Java lessons on this channel :) But maybe it''d be a good idea to add a SQL fundamentals playlist at some point :)
Hi Laur, I have a doubt on when the context is created here . Is it specific to a transaction or will that be specific to each entity manager? We are getting EntityManager from the factory specifying the database (persistence unit details) , will the context be specific to this entity manager created
Hi. The entity manager has the context and manages it. An entity manager can execute multiple transactions on a context. At a transaction commit the context is mirrored to the DB. I hope this helps.
I have gone through all your spring and jpa course. Is there any chance of creating Kafka and RabbitMq using spring play list as not much content is not availble in google which explains the whole concepts.
I have a JPA question. Suppose you have an entity with 10 attributes and you want to support aggregations like sum, avg etc on any combination of those 10 attributes. What approach do you take that isn’t too static? Ie. You don’t want to have an explosion of statically defined queries to support this.
Hey Laur, I have some questions about the flow from application to DB. We have two dependencies now, Hibernate and Hikari. From what I know DataSource manages the connection pool. Also Hibernate persists finally to DB. Where does Hikari comes then in this flow. Can you please tell how Hikari is used here. Hibernate calls Hikari?
@laurspilca First of all I'm really grateful for all your videos, they are truly one of a kind as they feel more like a solid lecture than a rushed tutorial. I really appreciate your in depth and theoretical explanation. My question is a bit off topic, but I'm really in your opinion regarding Maven and Gradle, what is the case for using Maven today when Gradle is also available ?
Hello. Thanks for your question. I don't think Gradle excludes Maven or the other way around. From my experience Maven seems to be the preferred in most situations. But it's only a matter of taste.
Hey Laurentiu, big fan! Just wanted to ask a quick question: Is your JPA/Hibernate playlist from 3 years ago still relevant? In which way will the current series differ from the old one?
Hi. The old playlist is still relevant. However it had not been recorded quite well. There are a lot of problems with the sound. That's one of the reason I decided to remake it.
Can you show how spring boot autoconfigure the connection to the database? what you showed here is a manual configuration. it will help us undestrand how spring works in the background.
Yes. But not in this playlist. This playlist is only about JPA and Hibernate. The whole idea (as I mentioned also in the video) is having developers understand properly everything that's behind the scenes when they use Hibernate regardless of the framework they use.
Hi Laur, I have a question about @Transactional((readOnly = true) and @Transactional. If I call a repository from a service class where the method in service class is annotated with @Transactional(readOnly=true) and the method in repository interface annotated with @Transactional. Will @Transactional in repository class override @Transaction(readOnly=true) in service class? What I think is that the answer is no, since the default propagation is REQUIRED which will take the first place Transactional is set and it will be applied through the chain of calls. Is that correct?
@laurspilca since the propagation has as default required which means that the @transactional you define in the first method should follow to all sub methods. Doesn't this mean that the Transactional defined in sub methods are not considered? Which means that if the Transaction defined in first method is defined as readOnly=true, this will follow to all sub methods? Or is it per design that Transactional will always override Transaction(readOnly=true) ? Thanks for your time
@@marounsleiman9230 To be honest, I'm not 100% sure about the readOnly attribute. This situation is quite strange. I don't see why you'd want to override the readOnly. Normally for other attributes it makes sense and for those I'm pretty sure the following @Transactional overrides the initial. But those are situations you find in real-world. The case of readOnly you mention is quite theoretical. I have to check to see what happens to be sure.
I like your videos, but why are you using such a Tinder thumbnail? It looks like you wanna stick in your viewers more than just jpa/hibernate knowledge, if you know what i mean *wink* *wink*
Code on GitHub: github.com/lspil/youtubechannel/tree/master/jpa_2023_c1_e1
Please laur complete this series as soon as possible. We are always eagerly waiting for lectures.
Love From India 🇮🇳🇮🇳
I am big fan from Egypt, professional SW as well. Your videos and books are intensive and sufficient!
Greetings from Cairo again.
Thank you!
I wish I knew you 3 years earlier. It would be a rescue for me and my life could go anorher way...
These fundamental lessons are exactly what I needed. I've starting software development lately and everything I'm using is highly abstracted, I admit I have no idea how most of my tools work.
By knowing the fundamentals, I'm confident I can have much greater impact later in my career.
I hope also to talk about:
- the comparison jOOQ and JPA.
- Database migration using flyway for ex.
I love your tutorial.
Hey there Laur. I'm pretty new to all this new java stuff like Spring, JPA, hibernate, etc. I used to work in AI/ML research but now I'm doing this.
I just wanted to say that I absolutely love your teaching. It has seriously helped me understand all these crazy concepts. Thank you so much!
Thank you for the never ending great tutorials Laur!
Thanks a lot Laur. Your lessons are so precious. ❤️
Thank you!
Hey Laur, I've been scouring the internet for resources on JPA/Hibernate, and I must say, your tutorial stands out as one of the most comprehensive ones I've come across. Kudos on creating such a valuable resource!
Glad to hear it helps :)
Thank you Laur, you're amazing!
Thank you so much for creating such wonderful videos! Your content is truly inspiring and has brought me so much joy and knowledge. Keep up the fantastic work, and know that your efforts are deeply appreciated. Looking forward to more amazing videos from you. Thank you again
🤟
Thank you Laur for starting the playlist.
Good in depth detail explanation.
Enjoyed learning from your video. thanks💯
Thank you so much for the course. You are great, greetings from Turkey!
Btw. I will be at Java Day Istanbul :) Maybe we meet there.
Thanks for this playlist
Hi Laur, Few Questions?
1. Are ORM frameworks used in Production Level Application?
2. If Yes, Can they be used with Large Scale Applications?
3. If Not, Why Learn them?
3.1 If Not, What is/are used in actual production Level Application?
Looking forward to your answer.
Hello. Thanks for your questions. Here're my answers.
1. Yes, definitely
2. Yes, of course they are
In fact, Hibernate and the JPA specification in general is one of the most encountered technologies in production apps in the Java world.
Great help... oh... My savior!!
great lecture as always sir, learn alot thank you
I used to come to București for work in the past, miss the wild night parties and good people there :)
It is a great tutorial 👏👏...keep up your work......
I really like your videos and have actually learnt a lot, would be good if you'd do a Spring Data Mongo series
Hi Laur, I went through a course(a few years old course) starting that "session is to be used" in place of Entity which you are using, my question is "was there a change recently or can session still be used?".
Thanks you for the educational videos, greatly appreciated.
Hey. Even when working with plain Hibernate today it's likely you'll prefer using EntityManager rather than Session today. But in the end, behind the scenes this only adapts the Session to the JPA specification.
awesome 🤩
Great video. Expecting more.
More will come, definitely :)
YOU ARE AWESOME
thanks :)
very good tutorial
please cover bidirectional, earger and lazy fetch, cache
It's been an honor learning from you☺
Great video! Please take into consideration buying pop filter for your mic so the video quality will be even better!
Hello ! Thank you very much for this video, as always you explain things very well. A question if I may: When the persistence.xml file was being used to bootstrap the emf, what datasource was used ? The reason why I ask is because when using the CustomerPersistenceUnitInfo, you explicitly added and configured Hikari datasource which makes me wonder what datasource did the xml file approach used.
Hey. Good question. In that case you don't have too much flexibility. Depending on the implementation you use and its version it may be different types of data sources configured.
Thanks Laur for being so nice. Want to know your view on impact of AI on Java development
Well, hard to predict that :)
Thanks! I just have two silly questions.😅
-> what does the term "persistence" actually means when we talk about JPA because in different context it have different meanings?
-> Are getters mandatory to be specified by a class annotated with @Entity?
Hi. Thanks for your questions.
1. In this case, persistence means persistently storing data in such a way in which you can later retrieve it.
2. While a JPA implementation can inject directly in the fields without needing to call setters and getters it's hard to believe you'll not need to access the data at some point later. So getters are not mandatory, but to get the values outside of the class, you'll most likely need them.
@@laurspilca thanks
Hello, you mentioned you have covered java fundamentals, did you cover by the chance sql, more specifically transactions and acid?
Hello. No, I didn't make any playlist on SQL. I only have Java lessons on this channel :) But maybe it''d be a good idea to add a SQL fundamentals playlist at some point :)
I hope you will write book about jpa/hibernate, thank you
Hi Laur,
I have a doubt on when the context is created here . Is it specific to a transaction or will that be specific to each entity manager? We are getting EntityManager from the factory specifying the database (persistence unit details) , will the context be specific to this entity manager created
Hi. The entity manager has the context and manages it. An entity manager can execute multiple transactions on a context. At a transaction commit the context is mirrored to the DB. I hope this helps.
I have gone through all your spring and jpa course. Is there any chance of creating Kafka and RabbitMq using spring play list as not much content is not availble in google which explains the whole concepts.
I have a JPA question. Suppose you have an entity with 10 attributes and you want to support aggregations like sum, avg etc on any combination of those 10 attributes. What approach do you take that isn’t too static? Ie. You don’t want to have an explosion of statically defined queries to support this.
Hey. Let's discuss this in future lessons.
Hey Laur, I have some questions about the flow from application to DB.
We have two dependencies now, Hibernate and Hikari.
From what I know DataSource manages the connection pool.
Also Hibernate persists finally to DB.
Where does Hikari comes then in this flow. Can you please tell how Hikari is used here.
Hibernate calls Hikari?
@laurspilca First of all I'm really grateful for all your videos, they are truly one of a kind as they feel more like a solid lecture than a rushed tutorial. I really appreciate your in depth and theoretical explanation. My question is a bit off topic, but I'm really in your opinion regarding Maven and Gradle, what is the case for using Maven today when Gradle is also available ?
Hello. Thanks for your question. I don't think Gradle excludes Maven or the other way around. From my experience Maven seems to be the preferred in most situations. But it's only a matter of taste.
sir, please make a video on Spring security 6 with Keycloak using OpenID.
Please try to schedule the live before it's time with one or two days
Sure. This one was scheduled at least a week in advance :)
Hey Laurentiu, big fan! Just wanted to ask a quick question: Is your JPA/Hibernate playlist from 3 years ago still relevant? In which way will the current series differ from the old one?
Hi. The old playlist is still relevant. However it had not been recorded quite well. There are a lot of problems with the sound. That's one of the reason I decided to remake it.
Can you show how spring boot autoconfigure the connection to the database? what you showed here is a manual configuration. it will help us undestrand how spring works in the background.
Yes. But not in this playlist. This playlist is only about JPA and Hibernate. The whole idea (as I mentioned also in the video) is having developers understand properly everything that's behind the scenes when they use Hibernate regardless of the framework they use.
teacher,like your video
do you have ppt in this course?
I love it!
by the way,do you have Paid cours?
Nope. Never use PPTs. And no, all I do for people is free, I charge only companies.
@@laurspilca thx teacher
nice course,hope you could launch premium course that charge (sorry for poor grammer but like your course)
Hi Laur, I have a question about @Transactional((readOnly = true) and @Transactional. If I call a repository from a service class where the method in service class is annotated with @Transactional(readOnly=true) and the method in repository interface annotated with @Transactional. Will @Transactional in repository class override @Transaction(readOnly=true) in service class? What I think is that the answer is no, since the default propagation is REQUIRED which will take the first place Transactional is set and it will be applied through the chain of calls. Is that correct?
Hi, Yes. I would expect the @Transactional in the repository to override the setup at the service level.
@@laurspilca thanks a lot. So propagation is not helping here. The Transactional will always override Transaction(readOnly=true) ?
@laurspilca since the propagation has as default required which means that the @transactional you define in the first method should follow to all sub methods. Doesn't this mean that the Transactional defined in sub methods are not considered? Which means that if the Transaction defined in first method is defined as readOnly=true, this will follow to all sub methods? Or is it per design that Transactional will always override Transaction(readOnly=true) ? Thanks for your time
@@marounsleiman9230 To be honest, I'm not 100% sure about the readOnly attribute. This situation is quite strange. I don't see why you'd want to override the readOnly. Normally for other attributes it makes sense and for those I'm pretty sure the following @Transactional overrides the initial. But those are situations you find in real-world. The case of readOnly you mention is quite theoretical. I have to check to see what happens to be sure.
How come the XML configuration variant doesn't use a connection pool? I thought they were essentially equivalent approaches.
Hello. It does use a connection pool behind the scenes. But I minimized the configuration and this way I left the default implementation.
Laur Spilca the legend
1:01:07
Please let me know the date of spring security 2nd edition releasing
Somewhere in autumn maybe? It's difficult to give a date since it's mainly not me making this possible
where did that persistence xml text came from??
Hello. Thanks for the question. The syntax is described in the JPA specification. That XML in the example I configured it myself.
@@laurspilca thank you!
35:00
can you send us github link
Yes. Already added it. You can find it in the pinned comment.
which software are you using for recording videos?
It's OBS. But I don't usually record, I most often just go live.
I like your videos, but why are you using such a Tinder thumbnail? It looks like you wanna stick in your viewers more than just jpa/hibernate knowledge, if you know what i mean *wink* *wink*
Hahaha. Lol. Never thought about that. Maybe you just have a dirty mind :))))
😂 actually I love the theme per topic, it makes it much more easier to differentiate between a sea of videos
Please subttitle in english
Hi. Subtitles are enabled but YT takes longer to process long videos. I don't think it's something I could do about that.
@laurspilca Hi first of all thanks for a deep explanation. I get this kind of error while running: Unable to locate persister.
p.s I use mariaDB
Hi. Did you enumerate your entities in the PU class?