浏览代码

Correction Invalid Entities

feature/export_comptable
Guillaume 4 年前
父节点
当前提交
5c84d7692b
共有 2 个文件被更改,包括 1 次插入38 次删除
  1. +1
    -1
      ShopBundle/Model/OrderProduct.php
  2. +0
    -37
      ShopBundle/Model/User.php

+ 1
- 1
ShopBundle/Model/OrderProduct.php 查看文件

@@ -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 查看文件

@@ -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[]
*/

正在加载...
取消
保存