Permalink
Browse files

Added constructor for one-to-many association

  • Loading branch information...
1 parent 1861da7 commit dde0c911437fbbfa07c69d14e8226444f39296ab @jcroll jcroll committed with iampersistent Jan 23, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/Vespolina/Entity/Invoice/Invoice.php
View
@@ -8,6 +8,8 @@
namespace Vespolina\Entity\Invoice;
+use Doctrine\Common\Collections\ArrayCollection;
+
use Vespolina\Entity\Invoice\InvoiceInterface;
use Vespolina\Entity\Order\OrderInterface;
use Vespolina\Entity\Partner\PartnerInterface;
@@ -29,6 +31,10 @@ class Invoice implements InvoiceInterface
protected $periodStart;
protected $previousInvoice;
+ public function __construct() {
+ $this->orders = new ArrayCollection();
+ }
+
public function getId()
{
return $this->id;

0 comments on commit dde0c91

Please sign in to comment.