Browse Source

Correction Invalid Entities

feature/export_comptable
Guillaume 4 years ago
parent
commit
5c84d7692b
2 changed files with 1 additions and 38 deletions
  1. +1
    -1
      ShopBundle/Model/OrderProduct.php
  2. +0
    -37
      ShopBundle/Model/User.php

+ 1
- 1
ShopBundle/Model/OrderProduct.php View File

protected $orderShop; protected $orderShop;


/** /**
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductInterface", inversedBy="orderProducts"))
* @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\ProductInterface"))
*/ */
protected $product; protected $product;



+ 0
- 37
ShopBundle/Model/User.php View File

*/ */
protected $merchant; protected $merchant;


/**
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\CreditHistoryInterface", mappedBy="user", orphanRemoval=true)
*/
protected $creditHistories;

/** /**
* @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\AddressInterface", mappedBy="user", cascade={"persist"}) * @ORM\OneToMany(targetEntity="Lc\ShopBundle\Context\AddressInterface", mappedBy="user", cascade={"persist"})
*/ */
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
$this->creditHistories = new ArrayCollection();
$this->addresses = new ArrayCollection(); $this->addresses = new ArrayCollection();
$this->orders = new ArrayCollection(); $this->orders = new ArrayCollection();
$this->groupUsers = new ArrayCollection(); $this->groupUsers = new ArrayCollection();
return $this; return $this;
} }


/**
* @return Collection|CreditHistory[]
*/
public function getCreditHistories(): Collection
{
return $this->creditHistories;
}

public function addCreditHistory(CreditHistory $creditHistory): self
{
if (!$this->creditHistories->contains($creditHistory)) {
$this->creditHistories[] = $creditHistory;
$creditHistory->setUser($this);
}

return $this;
}

public function removeCreditHistory(CreditHistory $creditHistory): self
{
if ($this->creditHistories->contains($creditHistory)) {
$this->creditHistories->removeElement($creditHistory);
// set the owning side to null (unless already changed)
if ($creditHistory->getUser() === $this) {
$creditHistory->setUser(null);
}
}

return $this;
}

/** /**
* @return Collection|Address[] * @return Collection|Address[]
*/ */

Loading…
Cancel
Save