Hi i am trying to create a OneToMany relationship between Page and Block tables but i am getting the following error on validating the schema:
[Mapping] FAIL - The entity-class 'mypath\Entity\Block' mapping is invalid:
* The association mypath\Entity\Block#pages refers to the inverse side field mypath\Entity\Page#blocks which does not exist.
[Mapping] FAIL - The entity-class 'mypath\Entity\Page' mapping is invalid:
* The association mypath\Entity\Page#block refers to the owning side field mypath\Entity\Block#page which does not exist.
Following are my page and Block Entities
Page:
/**
* @ORM\OneToMany(targetEntity="Block", mappedBy="page")
*/
private $block;
Block:
/**
* @ORM\ManyToOne(targetEntity="Page", inversedBy="block")
* @ORM\JoinColumn(referencedColumnName="id")
*/
private $pages;
I am not sure what wrong with it but seems to be something related to annotations. Please help, Thanks !!!