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

@@ -20,7 +20,7 @@ abstract class OrderProduct implements PriceInterface
protected $orderShop;

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


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

@@ -33,11 +33,6 @@ abstract class User extends UserModelFOS
*/
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"})
*/
@@ -97,7 +92,6 @@ abstract class User extends UserModelFOS
public function __construct()
{
parent::__construct();
$this->creditHistories = new ArrayCollection();
$this->addresses = new ArrayCollection();
$this->orders = new ArrayCollection();
$this->groupUsers = new ArrayCollection();
@@ -159,37 +153,6 @@ abstract class User extends UserModelFOS
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[]
*/

Loading…
Cancel
Save