We can use the union operation in Hibernate 6 to unify results from two related database entities. There are also a few other ways, depending on our circumstances.
Also find me here:
Baeldung Author
Ulisses Lima
By day, I write new code, I improve bad code, and I try to enforce performance standards. Mostly in Java. I also love automating stuff. Mostly in bash. By night, I write technical articles and write tools for personal management. For fun: I'm a Street Fighter player (3rd Strike and V), trying to learn Japanese.
Here's what I've written (so far):
Baeldung on Java
- All
- Spring Data (6)
- NoSQL (6)
- Testing (4)
- HTTP Client-Side (4)
- Spring Boot (3)
- Security (3)
- Java (3)
- Jackson (3)
- Spring Web (2)
- REST (2)
- Java IO (2)
- JPA (2)
- Core Java (2)
- Web Services (1)
- Spring WebFlux (1)
- Spring Persistence (1)
- Reactive (1)
- Persistence (1)
- Logging (1)
- Java Numbers (1)
- Java Map (1)
- Java Dates (1)
- Jakarta EE (1)
- JSON (1)
- Data (1)
- Architecture (1)
Flexible Pub/Sub Messaging With Spring Boot and Dapr
Filed under Spring Boot
Learn how to integrate Dapr with Spring Boot to create a publish/subscribe system without coupling to specific brokers.
Session/Cookie Management in Apache JMeter
Filed under Testing
Learn how JMeter manages sessions and cookies and set up a test plan that logs in to an application, accesses protected resources, and logs out. Along the way, use HTTP Cookie Manager, CSV Data Set Config, and response assertions to ensure tests simulate real-world user behavior.
How to Distinguish Between Field Absent vs. Null in Jackson
Filed under Jackson
See why it matters how you differentiate between null values and absent values, how this affects patch and partial updates, and how various Jackson configurations can help.
Setting Connection Timeout and Read Timeout for Jersey
Filed under Jakarta EE, Web Services
Learn the best practice way to set connection and read timeouts in a Jersey web service, whether you need it for a given request, for a given test, or across the application.
Automated Testing for OpenAPI Endpoints Using CATS
Filed under Testing
OpenAPI’s schema makes APIs that use it a good candidate for automated fuzzing and other security testing. Learn how CATS makes this simple to add to your project as well as visually appealing.
Guide to Using the JMeter Beanshell
Filed under Testing
Dive into the world of advanced test scripting with JMeter and BeanShell from generating dynamic request data to aggregating performance metrics.
HTTP DELETE With Request Body
Filed under REST, Spring Web
This article explores sending DELETE requests with bodies using popular REST clients like Spring’s RestTemplate and Apache HTTP libraries. Dive deeper to see how each client tackles the body and explore the code examples to see which method might be the best fit for your project.
How to Execute a Scheduled Task Only Once for a Spring Boot Application
Filed under Spring Boot
Learn how to execute a scheduled task only once for a Spring Boot application.