Dwie encje
ReportSchemaRowElement
I relacje do niej posiada encja
RowElementData
W pierwszej encji mam zrobioną właściwość
/**
* @ORM\OneToMany(targetEntity=RowElementData::class, mappedBy="element", cascade={"persist", "remove"})
*/
private $rowElementData;
Definiuje ją w kosntruktorze
$this->rowElementData = new ArrayCollection();
Posiadam metody:
/**
* @return Collection|RowElementData[]
*/
public function getRowElementData(): Collection
{
return $this->rowElementData;
}
public function addRowElementData(RowElementData $rowElementData): self
{
if (!$this->rowElementData->contains($rowElementData)) {
$this->rowElementData[] = $rowElementData;
$rowElementData->setElement($this);
}
return $this;
}
public function removeRowElementData(RowElementData $rowElementData): self
{
if ($this->rowElementData->removeElement($rowElementData)) {
// set the owning side to null (unless already changed)
if ($rowElementData->getElement() === $this) {
$rowElementData->setElement(null);
}
}
return $this;
}
A symfony krzyczy, że
Could not determine access type for property "rowElementData" in class "App\Entity\ReportSchemaRowElement".
Co robie źle? Bo już nie wiem o co chodzi. Obiekty tworze za pomocą formualrzy symfony poprzez odwołanie postmanem.
Mam dodaną drugą właściwość na tej samej zasadzie iwszystko działa prawidłowo, a z tą są takie problemy.