You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to retrieve paginated result with fetch and I am also getting duplicates in result. It happens when I am getting entities that have more than one attribute bound by @manytoone relation. Here is the pseudocode:
As you can see I get the same entity with Id = 3 4 times in the result set, due to 4 attributes bound to that entity. How can I remove such duplicates in result set? Thank you in advance
Expected behavior
No duplicates are returned in result
Actual behavior
Duplicates are returned when entity has several @onetomany or @manytomany bonds fetched
Description
I need to retrieve paginated result with fetch and I am also getting duplicates in result. It happens when I am getting entities that have more than one attribute bound by @manytoone relation. Here is the pseudocode:
Here is pseudo result I am getting:
As you can see I get the same entity with Id = 3 4 times in the result set, due to 4 attributes bound to that entity. How can I remove such duplicates in result set? Thank you in advance
Expected behavior
No duplicates are returned in result
Actual behavior
Duplicates are returned when entity has several @onetomany or @manytomany bonds fetched
Environment
Version: 1.6.11
JPA-Provider: Hibernate 6.4.4.Final
DBMS: PostgreSQL 16
The text was updated successfully, but these errors were encountered: