Fix mapping
This commit is contained in:
@@ -35,15 +35,20 @@ class Dictionary extends AbstractEntity
|
||||
return $this->translations;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\OnetoMany(targetEntity="\App\Model\Database\Entity\Term", mappedBy="dictionary")
|
||||
* @var Collection&iterable<Term>
|
||||
*/
|
||||
protected Collection $terms;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="\App\Model\Database\Entity\Language", inversedBy="dictionaries1")
|
||||
* @ORM\ManyToOne(targetEntity="Language", inversedBy="dictionaries1")
|
||||
* @ORM\JoinColumn(name="lang1_id", referencedColumnName="id")
|
||||
*/
|
||||
protected ?Language $lang1;
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="\App\Model\Database\Entity\Language", inversedBy="dictionaries2")
|
||||
* @ORM\ManyToOne(targetEntity="Language", inversedBy="dictionaries2")
|
||||
* @ORM\JoinColumn(name="lang2_id", referencedColumnName="id")
|
||||
*/
|
||||
protected ?Language $lang2;
|
||||
|
||||
@@ -43,13 +43,13 @@ class Language extends AbstractEntity
|
||||
|
||||
/*
|
||||
* @var Collection&iterable<Dictionary>
|
||||
* @ORM\OneToMany(targetEntity="\App\Model\Database\Entity\Dictionary", mappedBy="language")
|
||||
* @ORM\OneToMany(targetEntity="Dictionary", mappedBy="language")
|
||||
*/
|
||||
protected Collection $dictionaries1;
|
||||
|
||||
/*
|
||||
* @var Collection&iterable<Dictionary>
|
||||
* @ORM\OneToMany(targetEntity="\App\Model\Database\Entity\Dictionary", mappedBy="language")
|
||||
* @ORM\OneToMany(targetEntity="Dictionary", mappedBy="language")
|
||||
*/
|
||||
protected Collection $dictionaries2;
|
||||
|
||||
|
||||
@@ -8,8 +8,7 @@ use App\Model\Database\Entity\Attributes\TId;
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass="App\Model\Database\Repository\TermRepository")
|
||||
* @ORM\HasLifecycleCallbacks
|
||||
* @ORM\Table(indexes={@ORM\Index(columns={"string1"}, flags={"fulltext"}),
|
||||
@ORM\Index(columns={"string2"}, flags={"fulltext"})})
|
||||
* @ORM\Table(indexes={@ORM\Index(columns={"string1"}, flags={"fulltext"}),@ORM\Index(columns={"string2"}, flags={"fulltext"})})
|
||||
*/
|
||||
class Term extends AbstractEntity
|
||||
{
|
||||
@@ -23,7 +22,7 @@ class Term extends AbstractEntity
|
||||
}
|
||||
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity="Dictionary", inversedBy="fullDict",cascade={"persist", "remove" })
|
||||
* @ORM\ManyToOne(targetEntity="\App\Model\Database\Entity\Dictionary", inversedBy="terms",cascade={"persist", "remove" })
|
||||
*/
|
||||
protected $dictionary;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user