The article explains how to implement equals/hashCode for JPA entities. It covers common implementations and their potential issues. Find ready-to-use methods at the end.
Testcontainers allows us to create a production-like environment for integration testing. Review the most popular case: testing an application’s services and data access layer.
DTO is probably the most straightforward pattern in object-oriented programming. In this post, learn how to create them properly and the motives for using DTOs.
Spring Data JPA replacement with Spring Data JDBC may be a tricky task. In this post, have a look at tips, tricks, and traps waiting for you along the way.
One of the most popular starters in Spring Boot applications is Spring Data JPA. Hence, you have nearly no chance to avoid JPA-related questions during a job interview. Let's take a look at the most frequently asked questions with detailed answers.
In this article, we will review various options to store long text in the PostgreSQL database: @Lob attributes, TEXT, and long VARCHAR table columns. Also, we'll have a look at the difference between Hibernate 5 and 6 in storing long text data.
This article describes some edge cases when we implement many-to-many bidirectional associations in JPA and try to synchronize data in entities on both ends.
This article describes composite IDs in JPA and how to treat them properly. It covers both @EmbeddableID and @IdClass cases and reviews their difference.
ID generation on the client-side is not as simple as it seems. In JPA and Hibernate, we can use UUIDs, custom strategies, and dedicated ID generation servers.
"Just annotate a JPA entity's ID field with @Id and allow the DB to care about the rest!". Well, in some cases, defaults should be altered. In this article, we will see how altering the ID generation strategy can affect your app performance.
Comments
Sep 07, 2020 · Andrey Belyaev
Yep, probably. In CUBA, we use "deleted" date field as well as "deleted by" for audit purposes.