So I have the following setup: Product → one-to-one->Sku-(embeds)PriceListSkuImpl>one-to-many->SkuPriceData
one-to-many
CategoryProductXref->many-to-one->Category At some point I’m “cloning” a product(given the error I checked a number of times that I don’t re-assign or “clone” any collection) which in test-case I mimic by creating a new product. Then do refresh to both original and clone and that’s it. In test I also read category, and some other product, and initialize collections by accessing them, which seems is required to reproduce the issue. So once the final flush is happening I’m getting the Found shared references error for SkuImpl.priceListSku.priceDataList And the interesting thing that error(if you do debug) will be related to some other product/sku that didn’t participate in the cloning process, but just belong to the same category that original product does. While debigging I think there is some issue with handling cycles in the entity graph, so seems it does: Product->sku->priceDataList then it does Product->category_xref->category->all-product-in-category->category_xref->product->sku->priceDatalist and fails… |