Throwback to DevTalks Romania @Victor Rentea - Hibernating in Spring: Unleash the Magic - DevTalks Romania

Throwback to DevTalks Romania @Victor Rentea - Hibernating in Spring: Unleash the Magic

DevTalks Romania @Victor Rentea - Hibernating in Spring: Unleash the Magic

Victor Rentea is a highly sought-after speaker and technical trainer, with over a decade of experience in Java, personal development and leadership. He has inspired thousands of individuals in and outside the country, to break through barriers and achieve their goals. With his dynamic style and profound insights, Victor empowers audiences to get their true potential and create extraordinary results. We're aiming to see everyone who's looking for another way of working and enjoying Java culture.

Victor is our friend since the beginning of our events, and for this year you have the chance to meet him twice, on Java Stage at DevTalks Romania 2024, on 29-30th of May and also on 28th of May at Impact Hub Universitate where he will hold a dedicated workshop called "Refactoring Java like a Pro.


Here is a sneak peek down below from his session, but also check you can the entire speech right here.

Building a Spring Boot application with Lombok and JPA.

First, we will build a simple, simple, simple spring application. It's the GPA application, I will I will already start it. But before I start the application, I must start the database. Let me start the database first. Did he go now I started the database that the in memory database back from back for with some files on the on the file system? It's an h2 that runs in memory basically. Now, the GP application let's see if it started. Yes, so I can Who of you uses Spring? Spring Spring Boot? Let's see it. We'll do a little bit of spring today. So we have localhost 8080. And then the famous salary of soccer, soccer, soccer, soccer.

Using Hibernate for ORM and debugging issues.

Let's look in the database. There we go. Indeed, let me run again, the update. Yeah, but there is no change in the data. Really, if I go again, and fetch the data, the data never changed. What really happens here is that I was hoping that GPA will automatically update the company of the contact if and only if the contact remain attached to the current transaction.

So in short transaction that will fix me it was actually if I load it, you don't like that introduction, I load it, then I change it and and GPA automatically flushes at the end of the transaction these these updates traditionally, in your in your in any other JDBC or no SQL environment, whenever you want to change something you need to call a save at some point, in not in this case, GPA allows you dangerously to just update the field. And magically, at the end of the transaction, it flushes the change to the database.

For more tech content, don’t forget to save your seat for DevTalks Romania 2024 and get your tickets here: https://www.devtalks.ro/tickets

DevTalks 2024 Powered by Main sponsor