Java, JPA, Spring, Spring Data

Create and modification date with Spring Data

Using created and last modified fields for an entity is considered general pattern and a good practice. It provides you the information about what and when happens in your database, therefore makes your life easier when the time of problem solving comes. As we love to automatize such boring tasks, using Hibernate it is common to… Continue reading Create and modification date with Spring Data

Advertisement
JPA, Spring

Batching database operations with Spring and Hibernate

Recently I needed to do some database performance optimization for a Spring Boot application. The application persisted a huge amount of log like data to the Oracle database via Spring JPA. With Hibernate and Spring Data JPA it was not really deficient to write this data, due to the time of single datasource, transaction and… Continue reading Batching database operations with Spring and Hibernate

JPA, Spring, Spring Data

Using @ElementCollection in Spring JPA queries

In my domain model, I had a list of Strings to be stored. As it is a typical reason of using element collections, I decided to do so. Using element collection in the domain model has the following advantages: The domain model remains simple. No additional type, The connected list is bounded to the "master"… Continue reading Using @ElementCollection in Spring JPA queries