Fix portfolio entity

pull/4677/head^2
Angel Fernando Quiroz Campos 3 years ago
parent cf2fb13ba9
commit 06a4cd553b
  1. 8
      src/CoreBundle/Entity/Portfolio.php

@ -8,6 +8,9 @@ namespace Chamilo\CoreBundle\Entity;
use Chamilo\CoreBundle\Traits\UserTrait; use Chamilo\CoreBundle\Traits\UserTrait;
use DateTime; use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\Criteria;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'portfolio')] #[ORM\Table(name: 'portfolio')]
@ -56,8 +59,8 @@ class Portfolio
#[ORM\JoinColumn(name: 'category_id', referencedColumnName: 'id')] #[ORM\JoinColumn(name: 'category_id', referencedColumnName: 'id')]
protected PortfolioCategory $category; protected PortfolioCategory $category;
#[ORM\OneToMany(targetEntity: \Chamilo\CoreBundle\Entity\PortfolioComment::class)] #[ORM\OneToMany(mappedBy: 'item', targetEntity: PortfolioComment::class)]
private $comments; private Collection $comments;
#[ORM\Column(name: 'origin', type: 'integer', nullable: true)] #[ORM\Column(name: 'origin', type: 'integer', nullable: true)]
private int $origin; private int $origin;
@ -77,6 +80,7 @@ class Portfolio
public function __construct() public function __construct()
{ {
$this->category = new PortfolioCategory(); $this->category = new PortfolioCategory();
$this->comments = new ArrayCollection();
} }
/** /**

Loading…
Cancel
Save