私は警告を投げている多対多の関係を持っています:
Warning: array_combine(): Both parameters should have an equal number of elements in vendor/sonata-project/doctrine-orm-admin-bundle/Sonata/DoctrineORMAdminBundle/Model/ModelManager.php line 179
問題の管理者クラスは、SonataDoctrineORMAdminBundle を composer でバージョン 2.2.4 に更新するまで正常に動作していました。
問題は私のモデルにあると思いますが、それが何であるかはわかりません。
bundle\Entity\EntityOne:
type: entity
table: entityOne
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
title:
type: string
length: '100'
oneToMany:
entityRel:
targetEntity: EntityRel
mappedBy: entityOne
cascade: ["persist", "remove"]
lifecycleCallbacks: { }
bundle\Entity\EntityRel:
type: entity
table: entityRel
id:
entityOne:
associationKey: true
entityTwo:
associationKey: true
fields:
amount:
type: decimal
oneToOne:
entityOne:
targetEntity: EntityOne
entityTwo:
targetEntity: EntityTwo
lifecycleCallbacks: { }
bundle\Entity\EntityTwo:
type: entity
table: entityTwo
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
name:
type: string
length: '100'
oneToMany:
entityRel:
targetEntity: entityRel
mappedBy: entityTwo
cascade: ["persist", "remove"]
lifecycleCallbacks: { }
EntityRel が EntityOne と EntityTwo を金額フィールドで接続するという考え方です。2 つのテーブル間の各接続は一意である必要があるため、キーを複合化する必要があります。
何か案が?