Here's the demo: [https://github.com/romainmoreau/hhh-13721-demo|https://github.com/romainmoreau/hhh-13721-demo|smart-link]
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):
{noformat}[ fr org . romainmoreau hibernate . joindemo bugs .Child@ 7c048b30 29fd8e67 , fr org . romainmoreau hibernate . joindemo bugs .Child@ 7c048b30 29fd8e67 , fr org . romainmoreau hibernate . joindemo bugs .Child@ 7c048b30 29fd8e67 ]{noformat}
The expected behavior would be that the child collection of the root contains just one child entity like when it was inserted:
{noformat}[ fr org . romainmoreau hibernate . joindemo bugs .Child@ 7c048b30 29fd8e67 ]{noformat}
|
|