Skip to content

Commit

Permalink
Automatically remove orphans, allow the footprint to be null for auto…
Browse files Browse the repository at this point in the history
…matic removal
  • Loading branch information
Felicitus committed Jul 17, 2015
1 parent 23085c6 commit 0224c38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/PartKeepr/FootprintBundle/Entity/Footprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Footprint extends BaseEntity
* Holds the footprint attachments
*
* @ORM\OneToMany(targetEntity="PartKeepr\FootprintBundle\Entity\FootprintAttachment",
* mappedBy="footprint", cascade={"persist", "remove"})
* mappedBy="footprint", cascade={"persist", "remove"}, orphanRemoval=true)
* @UploadedFileCollection()
* @Groups({"default"})
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct()
*
* @param Footprint $footprint The footprint to set
*/
public function setFootprint(Footprint $footprint)
public function setFootprint(Footprint $footprint = null)
{
$this->footprint = $footprint;
}
Expand Down

0 comments on commit 0224c38

Please sign in to comment.