Here's the demo:
In this demo, there are two entities: Root and Child.
One root can have many childs (@OneToMany).
A child can have many parameters (@ElementCollection).
First, the demo creates with success a root with one child which contains 3 parameters (a, b and c).
The issue comes when the previously created root is retrieved from the database because the child collection of the root contains n times the same child entity (n being the number of parameters in the child, 3 in the demo):
The expected behavior would be that the child collection of the root contains just one child entity like when it was inserted: