Doctrine スキーマを使用していますが、manyToOne 関係の 1 つがデータベースに保持されないため、問題が発生しました。私の目には構文が正しいように見えるので、なぜそうなのかはわかりません。
誰でも問題を特定できますか?
以下はyamlの私のスキーマです。を実行した後、mysql-database にこれら 2 つのエンティティを関連付けるテーブルがありません
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: { }