public function addSubcategory(Subcategory $subcategory)
{
$subcategoryId = $subcategory->getId();
if ($this->hasSubcategory($subcategoryId)) {
throw new \Exception(sprintf('Subcategory %s already exists', $subcategoryId));
}
$this->subcategories[$subcategoryId] = $subcategory;
}