paint-brush
Hibernate 5 and Entities Duplication: Let’s Dive Under the Hoodby@shaolans
270 reads

Hibernate 5 and Entities Duplication: Let’s Dive Under the Hood

by Ling-Chun SO10mFebruary 9th, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Entity duplication occurs when tables are joined and multiple rows are matched. There are several methods to address this issue and they all use a Set to deduplicate entities. However, it may not work in certain scenarios due to the fact that, depending on your SELECT clause, it could return newly instantiated arrays of your selected entities for each row.

People Mentioned

Mention Thumbnail
featured image - Hibernate 5 and Entities Duplication: Let’s Dive Under the Hood
Ling-Chun SO HackerNoon profile picture
Ling-Chun SO

Ling-Chun SO

@shaolans

Software engineer specialized in Java/Spring Boot, I contributed to Open source projects like JHipster or Prettier-Java.

0-item

STORY’S CREDIBILITY

Original Reporting

Original Reporting

This story contains new, firsthand information uncovered by the writer.

L O A D I N G
. . . comments & more!

About Author

Ling-Chun SO HackerNoon profile picture
Ling-Chun SO@shaolans
Software engineer specialized in Java/Spring Boot, I contributed to Open source projects like JHipster or Prettier-Java.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite