partkeepr

fork of partkeepr
git clone https://git.e1e0.net/partkeepr.git
Log | Files | Refs | Submodules | README | LICENSE

commit ef731e125d9f5ac640789ae7971e653abbb04cac
parent f557821ec460bbfebdf4e42274cd10ac3711e97d
Author: Felicitus <felicitus@felicitus.org>
Date:   Fri,  4 Sep 2015 20:04:51 +0200

Allow the referenced part to be null

Diffstat:
Msrc/PartKeepr/PartBundle/Entity/PartDistributor.php | 2+-
Msrc/PartKeepr/PartBundle/Entity/PartManufacturer.php | 7+++++--
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/PartKeepr/PartBundle/Entity/PartDistributor.php b/src/PartKeepr/PartBundle/Entity/PartDistributor.php @@ -112,7 +112,7 @@ class PartDistributor extends BaseEntity * * @param Part $part The part */ - public function setPart(Part $part) + public function setPart(Part $part = null) { $this->part = $part; } diff --git a/src/PartKeepr/PartBundle/Entity/PartManufacturer.php b/src/PartKeepr/PartBundle/Entity/PartManufacturer.php @@ -6,11 +6,14 @@ use PartKeepr\ManufacturerBundle\Entity\Manufacturer; use PartKeepr\Util\BaseEntity; use Symfony\Component\Serializer\Annotation\Groups; -/** @ORM\Entity */ +/** + * @ORM\Entity + */ class PartManufacturer extends BaseEntity { /** * @ORM\ManyToOne(targetEntity="PartKeepr\PartBundle\Entity\Part",inversedBy="manufacturers") + * @var Part */ private $part; @@ -34,7 +37,7 @@ class PartManufacturer extends BaseEntity * * @param Part $part */ - public function setPart(Part $part) + public function setPart(Part $part = null) { $this->part = $part; }