Doctrineでいくつかの関係を作ろうとしています
LancamentoConf.orm.yml:
Amz\FinanceiroBundle\Entity\LancamentoConf:
type: entity
table: amz_financeiro_lancamento_conf
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
active:
type: string
length: 1
...
manyToOne:
conta:
targetEntity: ContaConf
inversedBy: contajoinlancamentoconf
joinColumn:
name: amz_financeiro_conta_conf_id
referencedColumnName: id
manyToOne:
centrodecusto:
targetEntity: Amz\AmzBundle\Entity\CentroDeCustoConf
inversedBy: lancamentoconf
joinColumn:
name: amz_centro_de_custo_conf_id
referencedColumnName: id
ContaConf.orm.yml:
Amz\FinanceiroBundle\Entity\ContaConf:
type: entity
table: amz_financeiro_conta_conf
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
active:
type: string
length: 1
...
oneToMany:
contajoinlancamentoconf:
targetEntity: LancamentoConf
mappedBy: lancamentoconf
しかし、「centrodecusto」関係だけが機能しています...
LancamentoConf.orm.yml の最後の 1 つの関係のみが機能することに気付きました。順序を変更すると (「centrodecusto」が最初で「conta」が 2 番目)、「centrodecusto」は問題なく動作します...