php - Entity class mapping is invalid -
hi trying create onetomany relationship between page , block tables getting next error on validating schema:
[mapping] fail - entity-class 'mypath\entity\block' mapping invalid: * association mypath\entity\block#pages refers inverse side field mypath\entity\page#blocks not exist. [mapping] fail - entity-class 'mypath\entity\page' mapping invalid: * association mypath\entity\page#block refers owning side field mypath\entity\block#page not exist.
following page , 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 not sure wrong seems related annotations. please help, !!!
in annotation, phone call properties "blocks , "page", they're called "block" , "pages" in actual code.
page:
/** * @orm\onetomany(targetentity="block", mappedby="page") */ private $blocks;
block:
/** * @orm\manytoone(targetentity="page", inversedby="blocks") */ private $page;
php symfony2
No comments:
Post a Comment