How to Fix Duplicate Data from Hibernate Queries
This problem was the bane of my existence when I first started using Hibernate because I had no idea where the problem was coming from.
If you’re executing a query and finding that you have a bunch of duplicate records and haven’t a clue why, then you’re in the right place.
You see the problem is typically caused by having left joins (or optional joins) in your objects. When you have a base object, like say User and it joins to another table/objec...
view more