Page 1 of 1

Sku not deleted while removing from ProductImpl?

Posted: Sat Oct 04, 2014 12:59 pm
by gowthamgutha
I am removing the additional skus from the product like this..

product.getAdditionalSkus().remove(1);

Here is what I've done..

Code: Select all

    @OneToMany(fetch = FetchType.LAZY, targetEntity = SkuImpl.class, mappedBy="product", orphanRemoval=true, cascade=CascadeType.REMOVE)
    @Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region="blProducts")
    @BatchSize(size = 50)
    @AdminPresentationCollection(friendlyName="ProductImpl_Additional_Skus", order = 1000,
        tab = Presentation.Tab.Name.ProductOptions, tabOrder = Presentation.Tab.Order.ProductOptions)
    @ClonePolicyCollection
    protected List<Sku> additionalSkus = new ArrayList<Sku>();


Still, I am not able to remove. How to do this?

Thanks in advance. Hope you will reply as soon as possible.