public function update(EntityInterface $entity, EntityInterface $existent) { if ($this->atributesDiff($existent->getPrice(), $entity->getPrice(), ['listPrice', 'sellPrice'])) { $this->savePrice($entity); } if ($this->atributesDiff($existent, $entity, ['stockQuantity'])) { $this->saveStock($entity); } return true; }