将Symfony从2.6升级到3.2后,我的一个用户的日志中出现此错误,但我不确定如何重现它:
request.CRITICAL: Uncaught PHP Exception Doctrine\Common\Persistence\Mapping\MappingException: "No mapping file found named 'VetControlClinic.orm.yml' for class 'AgriHealth\AhpBundle\Entity\VetControlClinic
这是双向多对多关系的连接表。相关的架构详细信息如下:
AgriHealth\AhpBundle\Entity\Vet:
type: entity
repositoryClass: AgriHealth\AhpBundle\Entity\VetRepository
manyToOne:
clinic:
targetEntity: Clinic
inversedBy: VetsOfClinic
joinColumn:
name: clinic_id
referencedColumnName: id
oneToOne:
user:
targetEntity: User
joinColumn:
name: user_id
referencedColumnName: id
manyToMany:
clinics:
targetEntity: Clinic
inversedBy: Vets
joinTable:
name: vet_control_clinic
joinColumns:
vet_id:
referencedColumnName: id
inverseJoinColumns:
clinic_id:
referencedColumnName: id
AgriHealth\AhpBundle\Entity\Clinic:
type: entity
table: clinic
repositoryClass: AgriHealth\AhpBundle\Entity\ClinicRepository
id:
id:
type: integer
generator: { strategy: AUTO }
manyToMany:
Vets:
targetEntity: Vet
mappedBy: clinics
根据Doctrine文档,我不确定在VetControlClinic.yml中添加什么,不应该要求什么?