private function checkRequiredData($data, $isNew)
    {
        // Either name or products must be set.
        if (array_key_exists('product', $data)) {
            // Product-id must be defined.
            $this->getProductId($data['product'], 'product.id');
        } else {
            $this->checkDataSet($data, 'name', $isNew);
            $this->checkDataSet($data, 'quantityUnit', $isNew);
        }
        $this->checkDataSet($data, 'quantity', $isNew);
    }