I have the following issue while implementing 2 onetomany association while loading an entity
Initially I had an issue of using "Collection" (for both variables) for @OnetoMany associations, hibernate threw an stack trace, then i decided to use "Set" for one, and "Collection" for another and solved the issue.
Now here is the scenario, while retriving the actuall values of: C has a collection of size 2, and B has a set of size 3 (cross verified it from the Database). But when I try to print the values of A, the 2 values contained in C are printed out properly, but each value in B is printed out 2 times, resulting in 6 outputs, but the actual should have been 3.
So if the actual values contained by C=x, and B=y, the number of values B prints after an iteration is x*y (i.e. y values are printed x times).
have any of you faced this issue before, or is this a bug? Is there a diffenet way to solve this issue?
Let me know!!!