public function removeStockLevel($stockEntry) { $stockEntry->setPart(null); $this->stockLevels->removeElement($stockEntry); }