SidusEAVModelBundle icon indicating copy to clipboard operation
SidusEAVModelBundle copied to clipboard

EAV event recompute changeset

Open VincentChalnot opened this issue 5 years ago • 1 comments

Recomputing changeset for attributes with removed values does not work.

Exemple:

foreach (array_unique($data->getRefererDatas()->toArray()) as $activity){
                if (self::ACTIVITY_FAMILY !== $activity->getFamilyCode()){
                    continue;
                }
                if(!in_array($activity, $actualActivities)){
                    $activity->removeSubscribers($data);
                    $activityAttribute = $activity->getFamily()->getAttribute('subscribers');
                    $event->recomputeAttributeChangeset($activity, $activityAttribute);
                }
            }
        }

VincentChalnot avatar Oct 15 '19 09:10 VincentChalnot

Works when manually removing the value with $em->remove()

VincentChalnot avatar Oct 15 '19 09:10 VincentChalnot