As a follow-up to #1186130-15: Line item deletion causes EntityMetadataWrapperException, we should do for Products and Customer Profiles what we did for referenced Line Items. Namely the respective delete hook implementations in the Product Reference and Customer modules should be turned into API functions that are called from the Product and Customer Profile controllers on delete. This should be done from within the same transaction used to delete the entity as I did with Line Item. The only hitch here is that the Product controller doesn't know about Product Reference, so we'll need some sort of pre-delete hook that the Product Reference module can use to ensure any references are cleared up. In fact, if we standardize on a pre-delete hook for any entity, we could probably get rid of the custom delete method as used on the Line Item controller.

Comments

bojanz’s picture

Issue summary: View changes
Status: Postponed » Closed (outdated)