Fixes nette3

This commit is contained in:
2022-01-16 21:51:34 +01:00
parent d14b1eccde
commit 849aa6d5b1
8 changed files with 221 additions and 39 deletions

View File

@@ -4,6 +4,8 @@ namespace App\Model\Database\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Model\Database\Entity\Attributes\TId;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
/**
* @ORM\Entity
@@ -17,14 +19,14 @@ class Dictionary extends AbstractEntity
{
$this->name = $name;
$this->fullName = $fullname;
$this->translations = new \Doctrine\Common\Collections\ArrayCollection();
$this->translations = new ArrayCollection();
}
/**
* @ORM\OneToMany(targetEntity="App\Model\Database\Entity\Translation", mappedBy="dictionary", cascade={"persist"})
* @var Article[]|\Doctrine\Common\Collections\ArrayCollection
* @var Collection&iterable<Translation>
*/
protected $translations;
protected Collection $translations;
public function getTranslations()
{
@@ -33,14 +35,16 @@ class Dictionary extends AbstractEntity
/**
* @ORM\ManyToOne(targetEntity="Language", inversedBy="lang1_dicionaries")
* @ORM\ManyToOne(targetEntity="Language", inversedBy="dictionaries1")
* @ORM\JoinColumn(name="lang1_id", referencedColumnName="id")
*/
protected $lang1;
protected ?Language $lang1;
/**
* @ORM\ManyToOne(targetEntity="Language", inversedBy="lang2_dicionaries")
* @ORM\ManyToOne(targetEntity="Language", inversedBy="dictionaries2")
* @ORM\JoinColumn(name="lang2_id", referencedColumnName="id")
*/
protected $lang2;
protected ?Language $lang2;
/**
* @ORM\Column(type="string")