symfony - Symfony2/Doctrine manyToOne-relationship does not appear in tables -
i'm working doctrine schema, ran trouble because 1 of manytoone-relationships won't persist in database. clueless why case, because eye, syntax looks correct.
can identify problem?
below schema in yaml. there no tables relating these 2 entities in mysql-database after running php app\console doctrine:schema:update --force.
me\mybundle\entity\freetextfield: type: entity table: null fields: id: type: integer id: true generator: strategy: auto name: type: string flagprivate: type: boolean description: type: text nullable: true onetomany: entries: targetentity: freetextentry mappedby: xfield lifecyclecallbacks: { } me\mybundle\entity\freetextentry: type: entity table: null fields: id: type: integer id: true generator: strategy: auto content: type: text manytoone: xfield: targetentity: freetextfield inversedby: entries manytoone: registration: targetentity: registration inversedby: freetextentries lifecyclecallbacks: { }
propably same problem here. need put manytoone -type associations under same type declaration in entity\freetextentry, so:
manytoone: xfield: targetentity: freetextfield inversedby: entries registration: targetentity: registration inversedby: freetextentries
Comments
Post a Comment