Doctrine2 [Semantical Error] Couldn't find constant?
The probleme Was the quote :/
with the good quote all is working
Thanks All for help
The answer of the question creator is correct. Anyways it is unclear, what he means by the problem was the quote.
Also ' should be used instead of a " to quote the values of the annotation attributes.
The issue for me was, that a quote was missing.
Wrong code:
/** * @ORM\OneToMany(targetEntity="UnternehmenBrancheZuordnung", mappedBy=_unternehmen") * @var ArrayCollection $_branchenZuordnungen */private $_branchenZuordnungen;
Right code:
/** * @ORM\OneToMany(targetEntity="UnternehmenBrancheZuordnung", mappedBy="_unternehmen") * @var ArrayCollection $_branchenZuordnungen */private $_branchenZuordnungen;
Here the missing quote is highlighted: mappedBy="
_unternehmen"