/**
* A unidirectional OneToMany association
*
* @var \Doctrine\Common\Collections\Collection<\Ireien\Course\Domain\Model\Item>
* @ORM\ManyToMany
* @ORM\JoinTable(inverseJoinColumns={@ORM\JoinColumn(onDelete="CASCADE")})
*/
protected $items;
/**
* @return void
*/
public function __construct() {
$this->items = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* @param \Ireien\Course\Domain\Model\Item $item
* @return void
*/
public function addItem(\Ireien\Course\Domain\Model\Item $item) {
$this->items->add($item);
}
Neo.Flow 模型单向1对多
最新推荐文章于 2022-06-27 00:29:58 发布