| The bug proved to be just a case of improper bidirectional side synchronization. This commit proves that the test runs just fine after doing the following changes:
- The @ManyToOne side controls the association, and the @OneToMany is mappedBy. Previously, this was not the case as both sides were trying to own the association.
- The addChild method which should synchronize both sides o the bidirectional association was not called at all. This was changed as well.
After doing these changes, the test works like a charm. |