This presentation is about best practices when using hibernate and Spring Data JPA. I'm sharing commons problems and possible solutions to them, and also the demo project is in Github, I hope you like.
4. Purpose of this presentation
● Alignment of knowledge
● Discuss best practices
5. Purpose of this presentation
● Alignment of knowledge
● Discuss best practices
● Demonstrate problems and possible solutions
6. Purpose of this presentation
● Alignment of knowledge
● Discuss best practices
● Demonstrate problems and possible solutions
● Review the way we use JPA
7. A little bit of context
● JPA: Java Persistence API, Java specification responsible for defining a standard way to
work with ORM between different providers.
● Hibernate: Started in 2001, the most popular ORM Java Framework.
● Spring Data JPA: One of the best spring projects, abstracts all the data access layer
using interface and removing almost all boilerplate.
In other words, these tools help us to focus on business logic instead of writing the same
repetitive code over and over again, thus making the developers more business oriented.
9. Be careful
● As always, everything comes at a price.
● When we are dealing with a critical system where performance is paramount, we need
to pay closer attention to the way we access our data, in order to use strictly the bare-
minimum.
● These frameworks can help us, but, without the correct use of the tools that they
provide us with, we can end up having big performance problems.
So, let's look at some of these potential problems.
37. Moving forward, it's time to OneToOne
mapping
● Mapping Lazy One to One Relationship
● Hibernate Issues
● Approches
● Different alternatives to solve this